Package: globus-gridftp-server / 6.10-2

globus-gridftp-server-pw195.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff -ur globus_gridftp_server-6.10.orig/globus_i_gfs_control.c globus_gridftp_server-6.10/globus_i_gfs_control.c
--- globus_gridftp_server-6.10.orig/globus_i_gfs_control.c	2012-03-23 01:37:49.000000000 +0100
+++ globus_gridftp_server-6.10/globus_i_gfs_control.c	2012-05-25 17:18:32.853986132 +0200
@@ -348,7 +348,7 @@
                 MAXPATHLEN,
                 &res_pwd);
             free(hd_name);
-            if(sc != 0)
+            if(sc != 0 || res_pwd == NULL)
             {
                 /* XXX expand other usernames here */
                 result = GlobusGFSErrorGeneric(
diff -ur globus_gridftp_server-6.10.orig/globus_i_gfs_data.c globus_gridftp_server-6.10/globus_i_gfs_data.c
--- globus_gridftp_server-6.10.orig/globus_i_gfs_data.c	2012-03-26 22:53:59.000000000 +0200
+++ globus_gridftp_server-6.10/globus_i_gfs_data.c	2012-05-25 17:18:32.856986094 +0200
@@ -1058,13 +1058,13 @@
 
     rc = globus_libc_getpwuid_r(getuid(), &pwent_mem, pw_buffer,
                                 pw_buflen, &pw_result);
-    if(rc != 0)
+    if(rc != 0 || pw_result == NULL)
     {
         globus_free(pw_buffer);
         return NULL;
     }
 
-    pwent = globus_l_gfs_pw_copy(&pwent_mem);
+    pwent = globus_l_gfs_pw_copy(pw_result);
     globus_free(pw_buffer);
 
     return pwent;
@@ -1099,13 +1099,13 @@
 
     rc = globus_libc_getpwnam_r(
         (char *)name, &pwent_mem, pw_buffer, pw_buflen, &pw_result);
-    if(rc != 0)
+    if(rc != 0 || pw_result == NULL)
     {
         globus_free(pw_buffer);
         return NULL;
     }
 
-    pwent = globus_l_gfs_pw_copy(&pwent_mem);
+    pwent = globus_l_gfs_pw_copy(pw_result);
     globus_free(pw_buffer);
 
     return pwent;