]> andersk Git - moira.git/commitdiff
Filter out things that aren't valid MIT IDs.
authorzacheiss <zacheiss>
Tue, 20 Apr 2004 19:25:37 +0000 (19:25 +0000)
committerzacheiss <zacheiss>
Tue, 20 Apr 2004 19:25:37 +0000 (19:25 +0000)
incremental/winad/winad.c

index 096f9ba630ad6b3b1b3c8c0ac57bfe9cf505390f..5a5e4822b94d6931ec05abf1cd15df54384caf68 100755 (executable)
@@ -3046,7 +3046,10 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name,
   linklist_free(group_base);
   group_count = 0;
 
-  rc = attribute_update(ldap_handle, distinguished_name, MitId, "employeeID", user_name);
+  if ((strlen(MitId) != 0) && (MitId[0] == '9'))
+    rc = attribute_update(ldap_handle, distinguished_name, MitId, "employeeID", user_name);
+  else
+    rc = attribute_update(ldap_handle, distinguished_name, "none", "employeeID", user_name);
   rc = attribute_update(ldap_handle, distinguished_name, Uid, "uid", user_name);
   rc = attribute_update(ldap_handle, distinguished_name, MoiraId, "mitMoiraId", user_name);
 
@@ -3337,7 +3340,7 @@ int user_create(int ac, char **av, void *ptr)
           ADD_ATTR("msSFU30UidNumber", uid_v, LDAP_MOD_ADD);
         }
     }
-  if (strlen(av[U_MITID]) != 0)
+  if ((strlen(av[U_MITID]) != 0) && (av[U_MITID][0] == '9'))
       mitid_v[0] = av[U_MITID];
   else
       mitid_v[0] = "none";
This page took 0.304612 seconds and 5 git commands to generate.