use ARG_MAX + 1

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12071 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2003-04-16 19:50:49 +00:00
parent f0a7089494
commit 15e51be8f2

View File

@@ -149,7 +149,7 @@ recv_bsd_auth (int s, u_char *buf,
*client_username = read_str (s, USERNAME_SZ, "local username");
*server_username = read_str (s, USERNAME_SZ, "remote username");
*cmd = read_str (s, ARG_MAX, "command");
*cmd = read_str (s, ARG_MAX + 1, "command");
pwd = getpwnam(*server_username);
if (pwd == NULL)
fatal(s, NULL, "Login incorrect.");
@@ -206,7 +206,7 @@ recv_krb4_auth (int s, u_char *buf,
*server_username = read_str (s, USERNAME_SZ, "remote username");
if (kuserok (&auth, *server_username) != 0)
fatal (s, NULL, "Permission denied.");
*cmd = read_str (s, ARG_MAX, "command");
*cmd = read_str (s, ARG_MAX + 1, "command");
syslog(LOG_INFO|LOG_AUTH,
"kerberos v4 shell from %s on %s as %s, cmd '%.80s'",
@@ -348,8 +348,8 @@ recv_krb5_auth (int s, u_char *buf,
krb5_get_err_text(context, status));
*server_username = read_str (s, USERNAME_SZ, "remote username");
*cmd = read_str (s, ARG_MAX, "command");
*client_username = read_str (s, ARG_MAX, "local username");
*cmd = read_str (s, ARG_MAX + 1, "command");
*client_username = read_str (s, ARG_MAX + 1, "local username");
if(protocol_version == 2) {
status = krb5_auth_con_getremotesubkey(context, auth_context,