* Removed unused gid parameter of syslog_sg().
* The loginname and tty buffers are never changed. Add the const qualifier.
This commit is contained in:
parent
d85b926a14
commit
5c6f68cd8f
@ -1,3 +1,9 @@
|
||||
2008-01-06 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/newgrp.c: Removed unused gid parameter of syslog_sg().
|
||||
* src/newgrp.c: The loginname and tty buffers are never changed.
|
||||
Add the const qualifier.
|
||||
|
||||
2008-01-06 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/chpasswd.c, src/chgpasswd.c: The crypt_method string always
|
||||
|
10
src/newgrp.c
10
src/newgrp.c
@ -58,7 +58,7 @@ static void usage (void);
|
||||
static void check_perms (const struct group *grp,
|
||||
struct passwd *pwd,
|
||||
const char *groupname);
|
||||
static void syslog_sg (gid_t gid, const char *name, const char *group);
|
||||
static void syslog_sg (const char *name, const char *group);
|
||||
|
||||
/*
|
||||
* usage - print command usage message
|
||||
@ -194,10 +194,10 @@ failure:
|
||||
* The loggout will also be logged when the user will quit the
|
||||
* sg/newgrp session.
|
||||
*/
|
||||
static void syslog_sg (gid_t gid, const char *name, const char *group)
|
||||
static void syslog_sg (const char *name, const char *group)
|
||||
{
|
||||
char *loginname = getlogin ();
|
||||
char *tty = ttyname (0);
|
||||
const char *loginname = getlogin ();
|
||||
const char *tty = ttyname (0);
|
||||
|
||||
if (loginname != NULL)
|
||||
loginname = xstrdup (loginname);
|
||||
@ -547,7 +547,7 @@ int main (int argc, char **argv)
|
||||
*/
|
||||
#ifdef USE_SYSLOG
|
||||
if (getdef_bool ("SYSLOG_SG_ENAB")) {
|
||||
syslog_sg (gid, name, group);
|
||||
syslog_sg (name, group);
|
||||
}
|
||||
#endif /* USE_SYSLOG */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user