*** user.c.old  Mon Jul 23 12:58:36 2001
--- user.c      Mon Jul 23 16:39:37 2001
***************
*** 252,254 ****
--- 252,290 ----
      }
  }
  
+ /*DVB*/
+ /* void domain_user(char **)
+  * This function changes the [EMAIL PROTECTED] to user=dom=ain=cctld
+  * Essentially s/[@\.]/MYSEP/g
+  * This is the simplest way to hack in virtual domain support.
+  * I'm not sure if this is the best idea, but looks to be the quickest
+  * One additional feature is that a username can have a . character in it
+  */
+ 
+ void domain_user(char **username)
+ {
+      /* User name is [EMAIL PROTECTED] */
+      char *user;
+      int i=0;
+      int imax = strlen(*username);
+      
+      user = (char *)calloc(imax+1,sizeof(char));
+      for (i=0;i<imax;i++)
+      {
+        if ((**username == '@') || (**username == '.')) {
+            user[i] = MY_SEPERATOR;
+        }
+        else {
+               user[i] = **username;
+       }
+        (*username)++;
+      }
+      
+      strcpy(*username,user);
+      /* We may have a default ending defined */
+      /* If yes, append that also. */
+ #if USE_EXTENSION
+       strncat(*username,DEFAULT_PATTERN,strlen(DEFAULT_PATTERN));
+ #endif
+        free(user); 
+ }      

This fixes a wierd renaming issue, when the renaming was correct, but
the daemon would not validate the user.
  
Devdas Bhagat
--
If you give Congress a chance to vote on both sides of an issue, it
will always do it.
                -- Les Aspin, D., Wisconsin

Reply via email to