[Pkg-shadow-commits] r2073 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon Jun 9 18:13:10 UTC 2008
Author: nekral-guest
Date: 2008-06-09 18:13:09 +0000 (Mon, 09 Jun 2008)
New Revision: 2073
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/find_new_ids.c
Log:
* libmisc/find_new_ids.c: Change find_new_uid() and find_new_gid()
prototypes to use a bool for their first argument (sys_user /
sys_group).
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-06-09 18:11:20 UTC (rev 2072)
+++ upstream/trunk/ChangeLog 2008-06-09 18:13:09 UTC (rev 2073)
@@ -1,5 +1,11 @@
2008-06-09 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/find_new_ids.c: Change find_new_uid() and find_new_gid()
+ prototypes to use a bool for their first argument (sys_user /
+ sys_group).
+
+2008-06-09 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/console.c: Change is_listed() prototype to return a bool.
The default parameter should also be a bool.
* libmisc/console.c: Add brackets and parenthesis.
Modified: upstream/trunk/libmisc/find_new_ids.c
===================================================================
--- upstream/trunk/libmisc/find_new_ids.c 2008-06-09 18:11:20 UTC (rev 2072)
+++ upstream/trunk/libmisc/find_new_ids.c 2008-06-09 18:13:09 UTC (rev 2073)
@@ -48,14 +48,14 @@
*
* Return 0 on success, -1 if no unused UIDs are available.
*/
-int find_new_uid (int sys_user, uid_t *uid, uid_t const *preferred_uid)
+int find_new_uid (bool sys_user, uid_t *uid, uid_t const *preferred_uid)
{
const struct passwd *pwd;
uid_t uid_min, uid_max, user_id;
assert (uid != NULL);
- if (sys_user == 0) {
+ if (!sys_user) {
uid_min = getdef_unum ("UID_MIN", 1000);
uid_max = getdef_unum ("UID_MAX", 60000);
} else {
@@ -131,14 +131,14 @@
*
* Return 0 on success, -1 if no unused GIDs are available.
*/
-int find_new_gid (int sys_group, gid_t *gid, gid_t const *preferred_gid)
+int find_new_gid (bool sys_group, gid_t *gid, gid_t const *preferred_gid)
{
const struct group *grp;
gid_t gid_min, gid_max, group_id;
assert (gid != NULL);
- if (sys_group == 0) {
+ if (!sys_group) {
gid_min = getdef_unum ("GID_MIN", 1000);
gid_max = getdef_unum ("GID_MAX", 60000);
} else {
More information about the Pkg-shadow-commits
mailing list