assert(Client != NULL);
assert(User != NULL);
-#if defined(PAM) && defined(IDENTAUTH)
+#if defined(PAM)
strlcpy(Client->orig_user, User, sizeof(Client->orig_user));
#endif
} /* Client_SetOrigUser */
*/
GLOBAL char *
Client_OrigUser(CLIENT *Client) {
-#ifndef IDENTAUTH
- char *user = Client->user;
-
- if (user[0] == '~')
- user++;
- return user;
-#else
return Client->orig_user;
-#endif
} /* Client_OrigUser */
#endif
char *cloaked; /* cloaked hostname of the client */
char *ipa_text; /* textual representaton of IP address */
char user[CLIENT_USER_LEN]; /* user name ("login") */
-#if defined(PAM) && defined(IDENTAUTH)
- char orig_user[CLIENT_USER_LEN];/* user name supplied by USER command */
+#if defined(PAM)
+ char orig_user[CLIENT_AUTHUSER_LEN];
+ /* original user name supplied by USER command */
#endif
char info[CLIENT_INFO_LEN]; /* long user name (user) / info text (server) */
char modes[CLIENT_MODE_LEN]; /* client modes */
#else
# define CLIENT_USER_LEN 10
#endif
+/** Max. length of user names saved for authentication (used by PAM) */
+#ifdef PAM
+# define CLIENT_AUTHUSER_LEN 64
+#endif
/** Max. length of "real names" (including NULL). */
#define CLIENT_NAME_LEN 32