]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - userinfo.c
Make b-tree cache functions static.
[thirdparty/sarg.git] / userinfo.c
index f7e5e0badd1ff3f48a3b535a08737e4bfc163585..c502d89033139435368ab10635d5da6131b2e70e 100644 (file)
@@ -400,18 +400,6 @@ enum UserProcessError process_user(const char **UserPtr,const char *IpAddress,bo
                if (strlen(user)>MAX_USER_LEN)
                        return(USERERR_NameTooLong);
 
-               // include_users
-               if (IncludeUsers[0] != '\0') {
-                       char wuser[MAX_USER_LEN+2]=":";
-                       char *str;
-
-                       strcat(wuser,user);
-                       strcat(wuser,":");
-                       str=strstr(IncludeUsers,wuser);
-                       if (!str)
-                               return(USERERR_Excluded);
-               }
-
                if (testvaliduserchar(user))
                        return(USERERR_InvalidChar);
 
@@ -455,10 +443,23 @@ enum UserProcessError process_user(const char **UserPtr,const char *IpAddress,bo
 
        auser=Alias_Replace(UserAliases,user);
        if (auser!=user) {
+               if (*auser==ALIAS_PREFIX) auser++;//no need for that indicator for a user name
                user=auser;
                *IsIp=false;
        }
 
+       // include_users
+       if (IncludeUsers[0] != '\0') {
+               char wuser[MAX_USER_LEN+2]=":";
+               char *str;
+
+               strcat(wuser,user);
+               strcat(wuser,":");
+               str=strstr(IncludeUsers,wuser);
+               if (!str)
+                       return(USERERR_Excluded);
+       }
+
        if (user[0]=='\0' || (user[1]=='\0' && (user[0]=='-' || user[0]==' ' || user[0]==':')))
                return(USERERR_EmptyUser);