/[smeserver]/rpms/cpu/sme8/cpu-1.4.3-mod-delete.patch
ViewVC logotype

Diff of /rpms/cpu/sme8/cpu-1.4.3-mod-delete.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by slords, Sat Nov 6 05:47:03 2010 UTC Revision 1.4 by slords, Sun Nov 7 23:22:25 2010 UTC
# Line 1  Line 1 
1  diff -up cpu-1.4.3/src/include/plugins/ldap/ldap.h.mod-delete cpu-1.4.3/src/include/plugins/ldap/ldap.h  diff -up cpu-1.4.3/src/include/plugins/ldap/ldap.h.mod-delete cpu-1.4.3/src/include/plugins/ldap/ldap.h
 diff -up cpu-1.4.3/src/include/plugins/ldap/ldap.h.mod-delete cpu-1.4.3/src/include/plugins/ldap/ldap.h  
2  --- cpu-1.4.3/src/include/plugins/ldap/ldap.h.mod-delete        2003-12-30 20:22:20.000000000 -0700  --- cpu-1.4.3/src/include/plugins/ldap/ldap.h.mod-delete        2003-12-30 20:22:20.000000000 -0700
3  +++ cpu-1.4.3/src/include/plugins/ldap/ldap.h   2010-11-05 23:41:22.000000000 -0600  +++ cpu-1.4.3/src/include/plugins/ldap/ldap.h   2010-11-05 23:54:19.000000000 -0600
4  @@ -127,8 +127,8 @@ int ldapCat(LDAP *ld);  @@ -127,8 +127,8 @@ int ldapCat(LDAP *ld);
5   uid_t getNextUid(LDAP * ld);   uid_t getNextUid(LDAP * ld);
6   gid_t getNextGid(LDAP * ld, ldapop_t op);   gid_t getNextGid(LDAP * ld, ldapop_t op);
# Line 15  diff -up cpu-1.4.3/src/include/plugins/l Line 14  diff -up cpu-1.4.3/src/include/plugins/l
14                        LDAPMod ** mods);                        LDAPMod ** mods);
15  diff -up cpu-1.4.3/src/plugins/ldap/group.c.mod-delete cpu-1.4.3/src/plugins/ldap/group.c  diff -up cpu-1.4.3/src/plugins/ldap/group.c.mod-delete cpu-1.4.3/src/plugins/ldap/group.c
16  --- cpu-1.4.3/src/plugins/ldap/group.c.mod-delete       2003-10-12 17:34:59.000000000 -0600  --- cpu-1.4.3/src/plugins/ldap/group.c.mod-delete       2003-10-12 17:34:59.000000000 -0600
17  +++ cpu-1.4.3/src/plugins/ldap/group.c  2010-11-05 23:41:22.000000000 -0600  +++ cpu-1.4.3/src/plugins/ldap/group.c  2010-11-05 23:54:19.000000000 -0600
18  @@ -31,7 +31,7 @@ LDAPMod **groupMod = NULL;  @@ -31,7 +31,7 @@ LDAPMod **groupMod = NULL;
19   int   int
20   ldapGroupAdd (LDAP * ld)   ldapGroupAdd (LDAP * ld)
# Line 67  diff -up cpu-1.4.3/src/plugins/ldap/grou Line 66  diff -up cpu-1.4.3/src/plugins/ldap/grou
66          }          }
67       }       }
68  diff -up cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete cpu-1.4.3/src/plugins/ldap/ld.c  diff -up cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete cpu-1.4.3/src/plugins/ldap/ld.c
69  --- cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete  2010-11-05 23:40:48.000000000 -0600  --- cpu-1.4.3/src/plugins/ldap/ld.c.mod-delete  2010-11-05 23:53:41.000000000 -0600
70  +++ cpu-1.4.3/src/plugins/ldap/ld.c     2010-11-05 23:41:22.000000000 -0600  +++ cpu-1.4.3/src/plugins/ldap/ld.c     2010-11-06 00:03:17.000000000 -0600
71  @@ -278,7 +278,7 @@ ldapAddList (LDAPMod ** mods)  @@ -278,7 +278,7 @@ ldapAddList (LDAPMod ** mods)
72   }   }
73    
# Line 78  diff -up cpu-1.4.3/src/plugins/ldap/ld.c Line 77  diff -up cpu-1.4.3/src/plugins/ldap/ld.c
77   {   {
78     char **temp;     char **temp;
79    
80  @@ -286,19 +286,53 @@ ldapBuildListStr (int mod_op, char *mod_  @@ -286,19 +286,65 @@ ldapBuildListStr (int mod_op, char *mod_
81       return mods;       return mods;
82    
83     if (value == NULL || strlen(value) == strspn(value, " "))     if (value == NULL || strlen(value) == strspn(value, " "))
84  -    return mods;  -    return mods;
85    -
86    -  mods = ldapAddList (mods);
87  +    {  +    {
88  +      int strsize = 1;  +      int strsize = 1;
89  +      char *filter = NULL;  +      char *filter = NULL;
90  +      int ldapres = 0;  +      int ldapres = 0;
91    +      int err = 0;
92  +  +
93  +      LDAPMessage *res[2];  +      LDAPMessage *res[2];
94  +      res[1] = NULL;  +      res[1] = NULL;
# Line 100  diff -up cpu-1.4.3/src/plugins/ldap/ld.c Line 102  diff -up cpu-1.4.3/src/plugins/ldap/ld.c
102  +      if (ldap_search_st (ld, globalLdap->dn, LDAP_SCOPE_BASE, filter, NULL, 0,  +      if (ldap_search_st (ld, globalLdap->dn, LDAP_SCOPE_BASE, filter, NULL, 0,
103  +         &globalLdap->timeout, res) != LDAP_SUCCESS)  +         &globalLdap->timeout, res) != LDAP_SUCCESS)
104  +       {  +       {
105  +         CPU_ldapPerror (ld, globalLdap,  +         if (ldap_get_option (ld, LDAP_OPT_ERROR_NUMBER, &err) < 0)
106  +                 "ldapBuildListStr: ldap_search_st");  +         {
107  +         return -1;  +           fprintf (stderr, "Error in ldap_get_option\n");
108    +           return -1;
109    +         }
110    +         if (err != LDAP_NO_SUCH_OBJECT)
111    +           {
112    +             CPU_ldapPerror (ld, globalLdap,
113    +                     "ldapBuildListStr: ldap_search_st");
114    +             return -1;
115    +           }
116  +       }  +       }
117  +      ldapres = ldap_count_entries (ld, res[0]);  +      else
 +      if (ldapres > 0)  
118  +       {  +       {
119  +         mods = ldapAddList (mods);  +         ldapres = ldap_count_entries (ld, res[0]);
120    +         if (ldapres > 0)
121  -  mods = ldapAddList (mods);  +           {
122  +         mods[list_size]->mod_op = LDAP_MOD_DELETE;  +             mods = ldapAddList (mods);
123  +         mods[list_size]->mod_type = strdup (mod_type);  +        
124  +         mods[list_size]->mod_values = NULL;  +             mods[list_size]->mod_op = LDAP_MOD_DELETE;
125  +         list_size++;  +             mods[list_size]->mod_type = strdup (mod_type);
126    +             mods[list_size]->mod_values = NULL;
127    +             list_size++;
128    +           }
129  +       }  +       }
130  +    }  +    }
131  +  else  +  else
# Line 143  diff -up cpu-1.4.3/src/plugins/ldap/ld.c Line 155  diff -up cpu-1.4.3/src/plugins/ldap/ld.c
155   }   }
156    
157  diff -up cpu-1.4.3/src/plugins/ldap/user.c.mod-delete cpu-1.4.3/src/plugins/ldap/user.c  diff -up cpu-1.4.3/src/plugins/ldap/user.c.mod-delete cpu-1.4.3/src/plugins/ldap/user.c
158  --- cpu-1.4.3/src/plugins/ldap/user.c.mod-delete        2010-11-05 23:40:48.000000000 -0600  --- cpu-1.4.3/src/plugins/ldap/user.c.mod-delete        2010-11-05 23:53:41.000000000 -0600
159  +++ cpu-1.4.3/src/plugins/ldap/user.c   2010-11-05 23:41:22.000000000 -0600  +++ cpu-1.4.3/src/plugins/ldap/user.c   2010-11-05 23:54:19.000000000 -0600
160  @@ -251,16 +251,16 @@ ldapUserCheck (int mod_op, LDAP * ld)  @@ -251,16 +251,16 @@ ldapUserCheck (int mod_op, LDAP * ld)
161      */      */
162     if (op == LDAP_MOD_ADD)     if (op == LDAP_MOD_ADD)
# Line 218  diff -up cpu-1.4.3/src/plugins/ldap/user Line 230  diff -up cpu-1.4.3/src/plugins/ldap/user
230            pos = pos->next;            pos = pos->next;
231          }          }
232       }       }
233    diff -up cpu-1.4.3/src/util/parser.c.mod-delete cpu-1.4.3/src/util/parser.c
234    --- cpu-1.4.3/src/util/parser.c.mod-delete      2010-11-07 16:05:19.000000000 -0700
235    +++ cpu-1.4.3/src/util/parser.c 2010-11-07 16:13:07.000000000 -0700
236    @@ -290,11 +290,7 @@
237                  p->cont = true;
238                  token = getToken(&cart[i], delim);
239                  if ( token == NULL )
240    -               {
241    -                 printf("%d: Malformed file, cannot continue parsing.\n",
242    -                        __LINE__);
243    -                 return NULL;
244    -               }
245    +               token = strdup ("");
246                }
247              p->attrval = delWhite(&token);
248              pos = parse;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed