[Pkg-shadow-commits] r2331 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun Aug 31 17:30:31 UTC 2008
Author: nekral-guest
Date: 2008-08-31 17:30:30 +0000 (Sun, 31 Aug 2008)
New Revision: 2331
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/su.c
Log:
* src/su.c: Add brackets and parenthesis.
* src/su.c: Avoid implicit conversion of pointers to booleans.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-08-31 17:30:21 UTC (rev 2330)
+++ upstream/trunk/ChangeLog 2008-08-31 17:30:30 UTC (rev 2331)
@@ -1,5 +1,10 @@
2008-08-29 Nicolas François <nicolas.francois at centraliens.net>
+ * src/su.c: Add brackets and parenthesis.
+ * src/su.c: Avoid implicit conversion of pointers to booleans.
+
+2008-08-29 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/list.c: Remove historical comment.
* libmisc/list.c: Added assertions for non NULL parameters.
Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c 2008-08-31 17:30:21 UTC (rev 2330)
+++ upstream/trunk/src/su.c 2008-08-31 17:30:30 UTC (rev 2331)
@@ -132,8 +132,10 @@
struct group *grp;
grp = getgrnam ("wheel"); /* !USE_PAM, no need for xgetgrnam */
- if (!grp || !grp->gr_mem)
+ if ( (NULL ==grp)
+ || (NULL == grp->gr_mem)) {
return 0;
+ }
return is_on_list (grp->gr_mem, username);
}
#endif /* !USE_PAM */
@@ -158,11 +160,12 @@
{
sulog (tty, 0, oldname, name); /* log failed attempt */
#ifdef USE_SYSLOG
- if (getdef_bool ("SYSLOG_SU_ENAB"))
+ if (getdef_bool ("SYSLOG_SU_ENAB")) {
SYSLOG (((0 != pwent.pw_uid) ? LOG_INFO : LOG_NOTICE,
"- %s %s:%s", tty,
('\0' != oldname[0]) ? oldname : "???",
('\0' != name[0]) ? name : "???"));
+ }
closelog ();
#endif
exit (1);
More information about the Pkg-shadow-commits
mailing list