full path to the tty or is NULL if no tty was present.
Note that configure substitution runs on the .man.in file not the
.pod file.
-59) Consider making a distinction between ID and WORD in what token
- gets passed in to the grammar.
+59) Consolidate line wrap code.
* will cause a crash if PAM_TTY is not set so if
* there is no tty, set PAM_TTY to the empty string.
*/
- if (strcmp(user_tty, "unknown") == 0)
+ if (user_ttypath == NULL)
(void) pam_set_item(pamh, PAM_TTY, "");
else
- (void) pam_set_item(pamh, PAM_TTY, user_tty);
+ (void) pam_set_item(pamh, PAM_TTY, user_ttypath);
return(AUTH_SUCCESS);
}
}
if ((p = ttyname(STDIN_FILENO)) || (p = ttyname(STDOUT_FILENO))) {
- if (strncmp(p, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- p += sizeof(_PATH_DEV) - 1;
- user_tty = estrdup(p);
+ user_tty = user_ttypath = estrdup(p);
+ if (strncmp(user_tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ user_tty += sizeof(_PATH_DEV) - 1;
} else
user_tty = "unknown";
char *path;
char *shell;
char *tty;
+ char *ttypath;
char *host;
char *shost;
char **runas;
#define user_ngroups (sudo_user.ngroups)
#define user_groups (sudo_user.groups)
#define user_tty (sudo_user.tty)
+#define user_ttypath (sudo_user.ttypath)
#define user_cwd (sudo_user.cwd)
#define user_runas (sudo_user.runas)
#define user_cmnd (sudo_user.cmnd)