]> andersk Git - moira.git/blobdiff - incremental/ldap/winad.c
Replace filter with search_filter.
[moira.git] / incremental / ldap / winad.c
index d2c9140a01043f2b1b3b78b02d6e707928abeef4..4e31c7a61f4bcf3729b3c273ce28ed8f7eff0b06 100755 (executable)
@@ -2419,6 +2419,7 @@ int group_rename(LDAP *ldap_handle, char *dn_path,
   LK_ENTRY  *group_base;
   int       group_count;
   int       MailDisabled = 0;
+  char      search_filter[1024];
 
   if(UseGroupUniversal)
     groupTypeControl = ADS_GROUP_TYPE_UNIVERSAL_GROUP;
@@ -2447,12 +2448,13 @@ int group_rename(LDAP *ldap_handle, char *dn_path,
          group_count = 0;
          group_base = NULL;
          
-         sprintf(filter, "(&(objectClass=user)(cn=%s))", after_group_name);
+         sprintf(search_filter, "(&(objectClass=user)(cn=%s))", 
+                 after_group_name);
          attr_array[0] = "cn";
          attr_array[1] = NULL;
 
-         if ((rc = linklist_build(ldap_handle, dn_path, filter, attr_array,
-                                  &group_base, &group_count,
+         if ((rc = linklist_build(ldap_handle, dn_path, search_filter, 
+                                  attr_array, &group_base, &group_count,
                                   LDAP_SCOPE_SUBTREE)) != 0)
          {
            com_err(whoami, 0, "Unable to process group %s : %s",
@@ -5564,8 +5566,6 @@ int user_delete(LDAP *ldap_handle, char *dn_path,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, "Unable to find user %s in directory",
-              user_name);
       goto cleanup;
     }
   
@@ -5685,6 +5685,9 @@ static int illegalchars_ldap[] = {
 int check_string(char *s)
 {
   char  character;
+  char  *string;
+
+  string = s;
 
   for (; *s; s++)
     {
@@ -5698,7 +5701,7 @@ int check_string(char *s)
          if (illegalchars[(unsigned) character])
            {
              com_err(whoami, 0, "Found illegal char '%c' (%d) in string %s",
-                     character, (unsigned) character, s);
+                     character, (unsigned) character, string);
              return 0;
            }
        }
@@ -5707,7 +5710,7 @@ int check_string(char *s)
          if (illegalchars_ldap[(unsigned) character])
            {
              com_err(whoami, 0, "Found illegal char '%c' (%d) in string %s",
-                     character, (unsigned) character, s);
+                     character, (unsigned) character, string);
              return 0;
            }
        }
This page took 0.035285 seconds and 4 git commands to generate.