]> andersk Git - moira.git/blobdiff - incremental/ldap/winad.c
Add call to populate_group().
[moira.git] / incremental / ldap / winad.c
index 1be8d6db5475292d8dc13435ce90405acfeb4170..bc87b9cd9f2a9b85c9f03b4d639ca01590ef905d 100755 (executable)
@@ -291,6 +291,7 @@ typedef struct _SID {
 #define MOIRA_KERBEROS  0x2
 #define MOIRA_STRINGS   0x4
 #define MOIRA_LISTS     0x8
+#define MOIRA_MACHINE   0x16
 
 #define CHECK_GROUPS    1
 #define CLEANUP_GROUPS  2
@@ -378,6 +379,7 @@ CN=Microsoft Exchange,CN=Services,CN=Configuration,"
 #define ACTIVE_DIRECTORY "ACTIVE_DIRECTORY:"
 #define PORT "PORT:"
 #define PROCESS_MACHINE_CONTAINER "PROCESS_MACHINE_CONTAINER:"
+#define GROUP_POPULATE_MEMBERS "GROUP_POPULATE_MEMBERS:"
 #define MAX_DOMAINS 10
 char DomainNames[MAX_DOMAINS][128];
 
@@ -417,6 +419,7 @@ int  ProcessMachineContainer = 1;
 int  ActiveDirectory = 1;
 int  UpdateDomainList;
 int  fsgCount;
+int  GroupPopulateDelete = 0;
 
 extern int set_password(char *user, char *password, char *domain);
 
@@ -801,7 +804,7 @@ void do_mcntmap(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
   
   if (rc = moira_connect())
     {
-      critical_alert("AD incremental",
+      critical_alert("Ldap incremental",
                     "Error contacting Moira server : %s",
                     error_message(rc));
       return;
@@ -845,7 +848,7 @@ void do_mcntmap(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
 
   if (machine_check(ldap_handle, dn_path, MachineName))
     {
-      com_err(whoami, 0, "Unable to find machine %s (alias %s) in AD.", 
+      com_err(whoami, 0, "Unable to find machine %s (alias %s) in directory.", 
              OriginalMachineName, MachineName);
       moira_disconnect();
       return;
@@ -893,7 +896,7 @@ void do_container(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
 
   if (rc = moira_connect())
     {
-      critical_alert("AD incremental", "Error contacting Moira server : %s",
+      critical_alert("Ldap incremental", "Error contacting Moira server : %s",
                     error_message(rc));
       return;
     }
@@ -1127,7 +1130,7 @@ void do_list(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
 
       if (rc = moira_connect())
         {
-          critical_alert("AD incremental",
+          critical_alert("Ldap incremental",
                          "Error contacting Moira server : %s",
                          error_message(rc));
           return;
@@ -1260,7 +1263,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
       if (!atoi(before[LM_EXTRA_ACTIVE]))
         {
           com_err(whoami, 0, 
-                 "Unable to add %s to group %s : group not active", 
+                 "Unable to remove %s from group %s : group not active", 
                  before[2], before[0]);
           return;
         }
@@ -1353,7 +1356,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
     {
       if (rc = moira_connect())
         {
-          critical_alert("AD incremental",
+          critical_alert("Ldap incremental",
                          "Error contacting Moira server : %s",
                          error_message(rc));
           return;
@@ -1397,9 +1400,16 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
       com_err(whoami, 0, "removing user %s from list %s", user_name, 
              group_name);
       pUserOu = user_ou;
-
       if (!strcasecmp(ptr[LM_TYPE], "MACHINE"))
         {
+         if (!ProcessMachineContainer)
+           {
+             com_err(whoami, 0, "Process machines and containers disabled, "
+                     "skipping");
+             return;
+           }
+
           memset(machine_ou, '\0', sizeof(machine_ou));
          memset(NewMachineName, '\0', sizeof(NewMachineName));
           if (get_machine_ou(ldap_handle, dn_path, ptr[LM_MEMBER], 
@@ -1454,7 +1464,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
        }
 
       if (rc = moira_connect()) {
-       critical_alert("AD incremental",
+       critical_alert("Ldap incremental",
                       "Error contacting Moira server : %s",
                       error_message(rc));              
        return;
@@ -1472,7 +1482,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
        {
          if (rc = moira_connect())
            {
-             critical_alert("AD incremental",
+             critical_alert("Ldap incremental",
                             "Error contacting Moira server : %s",
                             error_message(rc));
              return;
@@ -1555,7 +1565,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
         {
           if (rc = moira_connect())
             {
-              critical_alert("AD incremental", 
+              critical_alert("Ldap incremental", 
                              "Error connection to Moira : %s",
                              error_message(rc));
               return;
@@ -1631,7 +1641,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
     }
 
   if (rc = moira_connect()) {
-    critical_alert("AD incremental",
+    critical_alert("Ldap incremental",
                   "Error contacting Moira server : %s",
                   error_message(rc));              
     return;
@@ -1649,7 +1659,7 @@ void do_member(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
     {
       if (rc = moira_connect())
        {
-         critical_alert("AD incremental",
+         critical_alert("Ldap incremental",
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -1718,7 +1728,8 @@ void do_user(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
     {                                 
       if (atoi(before[U_STATE]) == 0)
         {
-          com_err(whoami, 0, "expunging user %s from AD", before[U_NAME]);
+          com_err(whoami, 0, "expunging user %s from directory", 
+                 before[U_NAME]);
           user_delete(ldap_handle, dn_path, before[U_NAME], before_user_id);
         }
       else
@@ -1739,7 +1750,7 @@ void do_user(LDAP *ldap_handle, char *dn_path, char *ldap_hostname,
 
       if (rc = moira_connect())
         {
-          critical_alert("AD incremental", 
+          critical_alert("Ldap incremental", 
                          "Error connection to Moira : %s",
                          error_message(rc));
           return;
@@ -2246,8 +2257,8 @@ int check_winad(void)
     {
       if (i > 30)
         {
-          critical_alert("AD incremental",
-                         "WINAD incremental failed (%s exists): %s",
+          critical_alert("Ldap incremental",
+                         "Ldap incremental failed (%s exists): %s",
                          STOP_FILE, tbl_buf);
           return(1);
         }
@@ -2478,7 +2489,7 @@ int group_rename(LDAP *ldap_handle, char *dn_path,
   if (group_count != 1)
     {
       com_err(whoami, 0, "Unable to process multiple groups with "
-             "MoiraId = %s exist in the AD", MoiraId);
+             "MoiraId = %s exist in the directory", MoiraId);
       return(AD_MULTIPLE_GROUPS_FOUND);
     }
 
@@ -2822,7 +2833,7 @@ int group_create(int ac, char **av, void *ptr)
 
       if ((rc != LDAP_SUCCESS) && (rc != LDAP_ALREADY_EXISTS))
         {
-          com_err(whoami, 0, "Unable to create list %s in AD : %s",
+          com_err(whoami, 0, "Unable to create list %s in directory : %s",
                   av[L_NAME], ldap_err2string(rc));
           callback_rc = rc;
           return(rc);
@@ -2957,7 +2968,7 @@ int group_create(int ac, char **av, void *ptr)
 
           if (rc != LDAP_SUCCESS)
             {
-              com_err(whoami, 0, "Unable to update list %s in AD : %s",
+              com_err(whoami, 0, "Unable to update list %s in directory : %s",
                       av[L_NAME], ldap_err2string(rc));
               callback_rc = rc;
               return(rc);
@@ -3140,7 +3151,7 @@ int ProcessGroupSecurity(LDAP *ldap_handle, char *dn_path,
   if (AceSidCount == 0)
     {
       com_err(whoami, 0, "Group %s: Administrator: %s, Type: %s - does not "
-             "have an AD SID.", TargetGroupName, AceName, AceType);
+             "have a directory SID.", TargetGroupName, AceName, AceType);
       com_err(whoami, 0, "   Non-admin security group template will be used.");
     }
   else
@@ -3360,7 +3371,7 @@ int group_delete(LDAP *ldap_handle, char *dn_path, char *group_name,
       if ((rc = ldap_delete_s(ldap_handle, group_base->dn)) != LDAP_SUCCESS)
         {
           linklist_free(group_base);
-          com_err(whoami, 0, "Unable to delete list %s from AD : %s",
+          com_err(whoami, 0, "Unable to delete list %s from directory : %s",
                   group_name, ldap_err2string(rc));
           return(rc);
         }
@@ -3369,7 +3380,7 @@ int group_delete(LDAP *ldap_handle, char *dn_path, char *group_name,
   else
     {
       linklist_free(group_base);
-      com_err(whoami, 0, "Unable to find list %s in AD.", group_name);
+      com_err(whoami, 0, "Unable to find list %s in directory.", group_name);
       return(AD_NO_GROUPS_FOUND);
     }
   
@@ -3413,9 +3424,10 @@ int member_list_build(int ac, char **av, void *ptr)
   char      **call_args;
   char      *s;
   call_args = ptr;
-  
-  strcpy(temp, av[ACE_NAME]);
 
+  strcpy(temp, av[ACE_NAME]);
+  StringTrim(temp);
+  
   if (!check_string(temp))
     return(0);
 
@@ -3440,13 +3452,12 @@ int member_list_build(int ac, char **av, void *ptr)
              strcat(s, ".mit.edu");
            }
        }
-      
+
       if (!((int)call_args[3] & MOIRA_STRINGS))
         return(0);
-
+       
       if (contact_create((LDAP *)call_args[0], call_args[1], temp, contact_ou))
         return(0);
-
     }
   else if (!strcmp(av[ACE_TYPE], "LIST"))
     {
@@ -3463,6 +3474,11 @@ int member_list_build(int ac, char **av, void *ptr)
         return(0);
 
     }
+  else if (!strcmp(av[ACE_TYPE], "MACHINE"))
+    {
+      if (!((int)call_args[3] & MOIRA_MACHINE))
+       return(0);
+    }
   else
     return(0);
 
@@ -3470,7 +3486,8 @@ int member_list_build(int ac, char **av, void *ptr)
 
   while (linklist)
     {
-    if (!strcasecmp(temp, linklist->member))
+    if (!strcasecmp(temp, linklist->member) &&
+       !strcasecmp(av[ACE_TYPE], linklist->type))
       return(0);
 
     linklist = linklist->next;
@@ -3523,7 +3540,7 @@ int member_remove(LDAP *ldap_handle, char *dn_path, char *group_name,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, "Unable to find list %s in AD",
+      com_err(whoami, 0, "Unable to find list %s in directory",
               group_name);
       linklist_free(group_base);
       group_base = NULL;
@@ -3654,7 +3671,7 @@ int member_add(LDAP *ldap_handle, char *dn_path, char *group_name,
       linklist_free(group_base);
       group_base = NULL;
       group_count = 0;
-      com_err(whoami, 0, "Unable to find list %s %d in AD",
+      com_err(whoami, 0, "Unable to find list %s %d in directory",
               group_name, group_count);
       return(AD_MULTIPLE_GROUPS_FOUND);
     }
@@ -3731,7 +3748,7 @@ int contact_remove_email(LDAP *ld, char *bind_path,
     
     if ((rc != LDAP_SUCCESS) && (rc != LDAP_ALREADY_EXISTS))
       {
-       com_err(whoami, 0, "Unable to modify contact %s in AD : %s",
+       com_err(whoami, 0, "Unable to modify contact %s in directory : %s",
                gPtr->dn, ldap_err2string(rc));
        return(rc);
       }
@@ -3990,10 +4007,6 @@ int contact_create(LDAP *ld, char *bind_path, char *user, char *group_ou)
       if(!strcmp(group_ou, contact_ou))
        {
          ADD_ATTR("mailRoutingAddress", mail_routing_v, LDAP_MOD_ADD);
-       }
-
-      if(!strcmp(group_ou, contact_ou))
-       {
          ADD_ATTR("eduPersonPrincipalName", mail_routing_v, LDAP_MOD_ADD);
        }
     }
@@ -4035,30 +4048,6 @@ int contact_create(LDAP *ld, char *bind_path, char *user, char *group_ou)
        }
     }
 
-  if ((rc != LDAP_SUCCESS) && (rc != LDAP_ALREADY_EXISTS))
-    {
-      n = 0;
-      ADD_ATTR("cn", contact_v, LDAP_MOD_ADD);
-      
-      if(ActiveDirectory)
-       {
-         ADD_ATTR("objectClass", objectClass_v, LDAP_MOD_ADD);
-       }
-      else
-       {
-         ADD_ATTR("objectClass", objectClass_ldap_v, LDAP_MOD_ADD);
-       }
-
-      ADD_ATTR("name", name_v, LDAP_MOD_ADD);
-      ADD_ATTR("displayName", name_v, LDAP_MOD_ADD);
-      ADD_ATTR("description", desc_v, LDAP_MOD_ADD);
-      mods[n] = NULL;
-      rc = ldap_add_ext_s(ld, new_dn, mods, NULL, NULL);
-
-      for (i = 0; i < n; i++)
-        free(mods[i]);
-    }
-
   if ((rc != LDAP_SUCCESS) && (rc != LDAP_ALREADY_EXISTS))
     {
       com_err(whoami, 0, "Unable to create contact %s : %s",
@@ -4208,7 +4197,7 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, "Unable to find user %s in AD",
+      com_err(whoami, 0, "Unable to find user %s in directory",
               user_name);
       linklist_free(group_base);
       return(AD_NO_USER_FOUND);
@@ -4223,7 +4212,7 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name,
     {
       if (rc = moira_connect())
        {
-         critical_alert("AD incremental", 
+         critical_alert("Ldap incremental", 
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -4480,7 +4469,7 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name,
     {
       if (rc = moira_connect())
        {
-         critical_alert("AD incremental", 
+         critical_alert("Ldap incremental", 
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -5253,7 +5242,7 @@ int user_create(int ac, char **av, void *ptr)
     {
       if (rc = moira_connect())
        {
-         critical_alert("AD incremental", 
+         critical_alert("Ldap incremental", 
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -5263,6 +5252,19 @@ int user_create(int ac, char **av, void *ptr)
       
       if (!(rc = mr_query("get_pobox", 1, argv, save_query_info, save_argv)))
        {
+          n = 0;
+         ADD_ATTR("mailRoutingAddress", mail_routing_v, LDAP_MOD_REPLACE);
+         mods[n] = NULL;
+         rc = ldap_modify_s((LDAP *)call_args[0], new_dn, mods);
+          
+         if (rc == LDAP_ALREADY_EXISTS || rc == LDAP_TYPE_OR_VALUE_EXISTS)
+            rc = LDAP_SUCCESS;
+
+         if(rc)
+            com_err(whoami, 0,
+                    "Unable to set the mailRoutingAddress for %s : %s",
+                    user_name, ldap_err2string(rc));
+
          p = strdup(save_argv[3]);
          
          if((c = strchr(p, ',')) != NULL) {
@@ -5418,7 +5420,7 @@ int user_change_status(LDAP *ldap_handle, char *dn_path,
   if (group_count != 1)
     {
       linklist_free(group_base);
-      com_err(whoami, 0, "Unable to find user %s in AD",
+      com_err(whoami, 0, "Unable to find user %s in directory",
               user_name);
       return(LDAP_NO_SUCH_OBJECT);
     }
@@ -5521,7 +5523,7 @@ int user_delete(LDAP *ldap_handle, char *dn_path,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, "Unable to find user %s in AD",
+      com_err(whoami, 0, "Unable to find user %s in directory",
               user_name);
       goto cleanup;
     }
@@ -5899,6 +5901,9 @@ int ProcessAce(LDAP *ldap_handle, char *dn_path, char *Name, char *Type,
           if (make_new_group(ldap_handle, dn_path, "", AceName, AceOu, 
                             AceMembership, 0, UpdateGroup, maillist))
             return(1);
+
+         populate_group(ldap_handle, dn_path, AceName, AceOu, AceMembership,
+                        0, "");
         }
       else if (!strcasecmp(AceInfo[0], "USER"))
         {
@@ -6009,14 +6014,18 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
   int       n = 0;
   char      group_dn[512];
   LDAPMod   *mods[20];
+  char      *member_v[] = {NULL, NULL};
   char      *save_argv[U_END];
+  char      machine_ou[256];
+  char      NewMachineName[1024];
 
   com_err(whoami, 0, "Populating group %s", group_name);
   av[0] = group_name;
   call_args[0] = (char *)ldap_handle;
   call_args[1] = dn_path;
   call_args[2] = group_name;
-  call_args[3] = (char *)(MOIRA_USERS | MOIRA_KERBEROS | MOIRA_STRINGS);
+  call_args[3] = (char *)(MOIRA_USERS | MOIRA_KERBEROS | MOIRA_STRINGS | 
+                         MOIRA_MACHINE);
   call_args[4] = NULL;
   member_base = NULL;
 
@@ -6029,7 +6038,7 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
     }
 
   members = (char **)malloc(sizeof(char *) * 2);
-  
+
   if (member_base != NULL)
     {
       ptr = member_base;
@@ -6042,6 +6051,12 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
               continue;
             }
          
+         if (!strcasecmp(ptr->type, "MACHINE") && !ProcessMachineContainer)
+           {
+             ptr = ptr->next;
+             continue;
+           }
+           
          if(!strcasecmp(ptr->type, "USER"))
            {
              if(!strcasecmp(ptr->member, PRODUCTION_PRINCIPAL) ||
@@ -6126,6 +6141,24 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
              sprintf(member, "cn=%s,%s,%s", escape_string(ptr->member), 
                      pUserOu, dn_path);
             }
+         else if (!strcasecmp(ptr->type, "MACHINE"))
+           {
+             memset(machine_ou, '\0', sizeof(machine_ou));
+             memset(NewMachineName, '\0', sizeof(NewMachineName));
+
+             if (!get_machine_ou(ldap_handle, dn_path, ptr->member,
+                                machine_ou, NewMachineName))
+               {
+                 pUserOu = machine_ou;
+                 sprintf(member, "cn=%s,%s,%s", NewMachineName, pUserOu,
+                         dn_path);
+               }
+             else
+               {
+                 ptr = ptr->next;                  
+                 continue;
+               }
+           }
 
          if(i > 1) 
            members = (char **)realloc(members, ((i + 2) * sizeof(char *)));
@@ -6139,13 +6172,31 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
     }
 
   members[i] = NULL;
+
+  sprintf(group_dn, "cn=%s,%s,%s", group_name, group_ou, dn_path);
+
+  if(GroupPopulateDelete)
+    {
+      n = 0;
+      ADD_ATTR("member", member_v, LDAP_MOD_REPLACE);
+      mods[n] = NULL;
+      
+      if ((rc = ldap_modify_s(ldap_handle, group_dn, 
+                             mods)) != LDAP_SUCCESS)
+       {
+         com_err(whoami, 0,
+                 "Unable to populate group membership for %s: %s",
+                 group_dn, ldap_err2string(rc));
+       }
   
+      for (i = 0; i < n; i++)
+       free(mods[i]);
+    }
+
   n = 0;
   ADD_ATTR("member", members, LDAP_MOD_REPLACE);
   mods[n] = NULL;
-  
-  sprintf(group_dn, "cn=%s,%s,%s", group_name, group_ou, dn_path);
-  
+
   if ((rc = ldap_modify_s(ldap_handle, group_dn, 
                          mods)) != LDAP_SUCCESS)
     {
@@ -6156,7 +6207,7 @@ int populate_group(LDAP *ldap_handle, char *dn_path, char *group_name,
   
   for (i = 0; i < n; i++)
     free(mods[i]);
-  
+    
   free(members);
 
   return(0);
@@ -6818,7 +6869,7 @@ int container_delete(LDAP *ldap_handle, char *dn_path, int count, char **av)
       if (rc == LDAP_NOT_ALLOWED_ON_NONLEAF)
         container_move_objects(ldap_handle, dn_path, distinguishedName);
       else
-        com_err(whoami, 0, "Unable to delete container %s from AD : %s",
+        com_err(whoami, 0, "Unable to delete container %s from directory : %s",
                 av[CONTAINER_NAME], ldap_err2string(rc));
     }
 
@@ -7402,9 +7453,6 @@ int get_machine_ou(LDAP *ldap_handle, char *dn_path, char *member,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, 
-             "Unable to process machine %s : machine not found in AD",
-              NewMachineName);
       return(1);
     }
 
@@ -7499,7 +7547,7 @@ int machine_move_to_ou(LDAP *ldap_handle, char * dn_path,
 
   if (group_count != 1)
     {
-      com_err(whoami, 0, "Unable to find machine %s in AD: %s", 
+      com_err(whoami, 0, "Unable to find machine %s in directory: %s", 
              MoiraMachineName);
       return(1);
     }
@@ -8044,7 +8092,7 @@ int SetHomeDirectory(LDAP *ldap_handle, char *user_name,
     {
       if (rc = moira_connect())
        {
-          critical_alert("AD incremental",
+          critical_alert("Ldap incremental",
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -8115,7 +8163,7 @@ int SetHomeDirectory(LDAP *ldap_handle, char *user_name,
     {
       if (rc = moira_connect())
        {
-          critical_alert("AD incremental",
+          critical_alert("Ldap incremental",
                         "Error contacting Moira server : %s",
                         error_message(rc));
          return;
@@ -8323,7 +8371,7 @@ int attribute_update(LDAP *ldap_handle, char *distinguished_name,
                                  mods)) != LDAP_SUCCESS)
             {
               com_err(whoami, 0, "Unable to change the %s attribute for %s "
-                     "in the AD : %s",
+                     "in the directory : %s",
                       attribute, user_name, ldap_err2string(rc));
             }
         }
@@ -8530,6 +8578,19 @@ int ReadConfigFile(char *DomainName)
                      ActiveDirectory = 0;
                  }
              }
+           else if (!strncmp(temp, GROUP_POPULATE_MEMBERS, 
+                             strlen(GROUP_POPULATE_MEMBERS)))
+             {
+               if (strlen(temp) > (strlen(GROUP_POPULATE_MEMBERS)))
+                 {
+                   strcpy(temp1, &temp[strlen(GROUP_POPULATE_MEMBERS)]);
+                   StringTrim(temp1);
+                   if (!strcasecmp(temp1, "DELETE")) 
+                     {
+                       GroupPopulateDelete = 1;
+                     }
+                 }
+             }
             else
              {
                 if (strlen(ldap_domain) != 0)
@@ -8884,15 +8945,6 @@ char *escape_string(char *s)
 
   q = s;
 
-  /* Replace leading spaces */
-
-  while(isspace(*q)) {
-    string[i++] = '\\';
-    string[i++] = '2';
-    string[i++] = '0';
-    q++;
-  }
-
   /* Escape any special characters */
 
   for(; *q != '\0'; q++) {
This page took 0.443135 seconds and 4 git commands to generate.