static void open_shadow (void);
static void faillog_reset (uid_t);
static void lastlog_reset (uid_t);
-static void tallylog_reset (char *);
+static void tallylog_reset (const char *);
static void usr_update (void);
static void create_home (void);
static void create_mail (void);
}
}
-static void tallylog_reset (char *user_name)
+static void tallylog_reset (const char *user_name)
{
const char pam_tally2[] = "/sbin/pam_tally2";
const char *pname;
{
struct passwd pwent;
struct spwd spent;
+ char *tty;
/*
* Fill in the password structure with any new fields, making
* Create a syslog entry. We need to do this now in case anything
* happens so we know what we were trying to accomplish.
*/
+ tty=ttyname (STDIN_FILENO);
SYSLOG ((LOG_INFO,
- "new user: name=%s, UID=%u, GID=%u, home=%s, shell=%s",
+ "new user: name=%s, UID=%u, GID=%u, home=%s, shell=%s, from=%s",
user_name, (unsigned int) user_id,
- (unsigned int) user_gid, user_home, user_shell));
+ (unsigned int) user_gid, user_home, user_shell,
+ tty ? tty : "none" ));
/*
* Initialize faillog and lastlog entries for this UID in case