* libmisc/console.c, libmisc/motd.c, libmisc/setupenv.c,

libmisc/sulog.c, libmisc/hushed.c, libmisc/failure.c,
	libmisc/loginprompt.c, libmisc/ttytype.c,
	libmisc/pam_pass_non_interractive.c, src/userdel.c, src/login.c,
	lib/commonio.c, lib/commonio.h: Fix some const issues.
	* libmisc/motd.c: Avoid multi-statements lines.
	* libmisc/motd.c: Support long MOTD_FILE.
	* libmisc/list.c, lib/prototypes.h: Revert previous change.
	dup_list and is_on_list are used with members as defined for the
	group structure, and thus even if the list is not modified, the
	list elements cannot be constant strings.
	* libmisc/system.c: Avoid C++ comments.
	* src/vipw.c: WITH_TCB cannot be tested inside a gettextized
	string. Split the Usage string.
	* lib/commonio.h: Re-indent.
This commit is contained in:
nekral-guest
2010-08-21 15:32:53 +00:00
parent 6a2f349ec5
commit f7a00a2334
17 changed files with 72 additions and 42 deletions

View File

@ -47,7 +47,7 @@
*/
void sulog (const char *tty, bool success, const char *oldname, const char *name)
{
char *sulog_file;
const char *sulog_file;
time_t now;
struct tm *tm;
FILE *fp;
@ -62,8 +62,10 @@ void sulog (const char *tty, bool success, const char *oldname, const char *name
"FAILED su for %s by %s",name,oldname));
}
if ((sulog_file = getdef_str ("SULOG_FILE")) == (char *) 0)
sulog_file = getdef_str ("SULOG_FILE");
if (NULL == sulog_file) {
return;
}
oldgid = getgid ();
oldmask = umask (077);