* libmisc/sulog.c (sulog): The success argument is a bool.
* libmisc/sulog.c: The return values of fflush is not checked on purpose. * libmisc/sulog.c: Indicate that some return values should be checked.
This commit is contained in:
parent
70ef747a56
commit
c6364944d4
@ -1,3 +1,11 @@
|
|||||||
|
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* libmisc/sulog.c (sulog): The success argument is a bool.
|
||||||
|
* libmisc/sulog.c: The return values of fflush is not checked on
|
||||||
|
purpose.
|
||||||
|
* libmisc/sulog.c: Indicate that some return values should be
|
||||||
|
checked.
|
||||||
|
|
||||||
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
|
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* libmisc/ttytype.c: Avoid implicit conversion of pointers /
|
* libmisc/ttytype.c: Avoid implicit conversion of pointers /
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* Copyright (c) 1989 - 1992, Julianne Frances Haugh
|
* Copyright (c) 1989 - 1992, Julianne Frances Haugh
|
||||||
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
|
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
|
||||||
* Copyright (c) 2001 - 2005, Tomasz Kłoczko
|
* Copyright (c) 2001 - 2005, Tomasz Kłoczko
|
||||||
|
* Copyright (c) 2008 , Nicolas François
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -40,10 +41,11 @@
|
|||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "getdef.h"
|
#include "getdef.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sulog - log a SU command execution result
|
* sulog - log a SU command execution result
|
||||||
*/
|
*/
|
||||||
void sulog (const char *tty, int success, const char *oldname, const char *name)
|
void sulog (const char *tty, bool success, const char *oldname, const char *name)
|
||||||
{
|
{
|
||||||
char *sulog_file;
|
char *sulog_file;
|
||||||
time_t now;
|
time_t now;
|
||||||
@ -93,6 +95,8 @@ void sulog (const char *tty, int success, const char *oldname, const char *name)
|
|||||||
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min,
|
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min,
|
||||||
success ? '+' : '-', tty, oldname, name);
|
success ? '+' : '-', tty, oldname, name);
|
||||||
|
|
||||||
fflush (fp);
|
(void) fflush (fp);
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
|
/* TODO: log if failure */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user