cpu/cpu-1.4.3-rhel5.patch

36 lines
1.3 KiB
Diff

diff -Nur -x '*.orig' -x '*.rej' cpu-1.4.3/src/plugins/ldap/commandline.c mezzanine_patched_cpu-1.4.3/src/plugins/ldap/commandline.c
--- cpu-1.4.3/src/plugins/ldap/commandline.c 2004-01-12 00:31:02.000000000 -0500
+++ mezzanine_patched_cpu-1.4.3/src/plugins/ldap/commandline.c 2007-07-24 14:55:44.000000000 -0400
@@ -83,7 +83,7 @@
if (passent == NULL)
return -1;
bzero (passent, sizeof (struct cpass));
- (int) passent->sp_lstchg = passent->sp_min = passent->sp_max = -10;
+ passent->sp_lstchg = (int)(passent->sp_min = passent->sp_max = -10);
passent->sp_warn = passent->sp_inact = passent->sp_expire = -10;
passent->sp_flag = -10;
passent->pw_gid = -10;
diff -Nur -x '*.orig' -x '*.rej' cpu-1.4.3/src/plugins/ldap/ld.c mezzanine_patched_cpu-1.4.3/src/plugins/ldap/ld.c
--- cpu-1.4.3/src/plugins/ldap/ld.c 2004-01-11 23:47:37.000000000 -0500
+++ mezzanine_patched_cpu-1.4.3/src/plugins/ldap/ld.c 2007-07-24 14:56:36.000000000 -0400
@@ -803,11 +803,14 @@
return -10;
if (gid != NULL)
{
- gid = ldap_get_values (ld, pos, gid)[0];
- if (gid != NULL)
- return atoi (gid);
- else
- return -10;
+ char **gidval = ldap_get_values (ld, pos, gid);
+ int val;
+
+ if (gidval == NULL)
+ return -10;
+ val = atoi (*gidval);
+ ldap_value_free (gidval);
+ return val;
}
else
return -10;