[Pkg-shadow-commits] r2141 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Jun 13 19:52:59 UTC 2008
Author: nekral-guest
Date: 2008-06-13 19:52:58 +0000 (Fri, 13 Jun 2008)
New Revision: 2141
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/sulog.c
Log:
* libmisc/sulog.c: Ignore the return value of umask() when the
mask is restored.
* libmisc/sulog.c: Add brackets.
* libmisc/sulog.c: Ignore return value of time() when use with a
non NULL argument.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-06-13 19:50:49 UTC (rev 2140)
+++ upstream/trunk/ChangeLog 2008-06-13 19:52:58 UTC (rev 2141)
@@ -1,5 +1,13 @@
2008-06-13 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/sulog.c: Ignore the return value of umask() when the
+ mask is restored.
+ * libmisc/sulog.c: Add brackets.
+ * libmisc/sulog.c: Ignore return value of time() when use with a
+ non NULL argument.
+
+2008-06-13 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/log.c: Avoid assignments in comparisons.
* libmisc/log.c: Add brackets and parenthesis.
* libmisc/log.c: read() returns a ssize_t (note size_t).
Modified: upstream/trunk/libmisc/sulog.c
===================================================================
--- upstream/trunk/libmisc/sulog.c 2008-06-13 19:50:49 UTC (rev 2140)
+++ upstream/trunk/libmisc/sulog.c 2008-06-13 19:52:58 UTC (rev 2141)
@@ -76,7 +76,7 @@
oldgid = 0;
}
fp = fopen (sulog_file, "a+");
- umask (oldmask);
+ (void) umask (oldmask);
if ((oldgid != 0) && (setgid (oldgid) != 0)) {
perror ("setgid");
SYSLOG ((LOG_ERR,
@@ -85,10 +85,11 @@
/* Do not return if the group permission were raised. */
exit (1);
}
- if (fp == (FILE *) 0)
+ if (fp == (FILE *) 0) {
return; /* can't open or create logfile */
+ }
- time (&now);
+ (void) time (&now);
tm = localtime (&now);
fprintf (fp, "SU %.02d/%.02d %.02d:%.02d %c %s %s-%s\n",
More information about the Pkg-shadow-commits
mailing list