+2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
+
+ * libmisc/find_new_ids.c: Use getdef_ulong to retrieve UIDs/GIDs
+ from login.defs. Type constants to long integers.
+
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* lib/gshadow.c: Use a bool when possible instead of int integers.
assert (uid != NULL);
if (!sys_user) {
- uid_min = getdef_unum ("UID_MIN", 1000);
- uid_max = getdef_unum ("UID_MAX", 60000);
+ uid_min = getdef_ulong ("UID_MIN", 1000L);
+ uid_max = getdef_ulong ("UID_MAX", 60000L);
} else {
- uid_min = getdef_unum ("SYS_UID_MIN", 1);
- uid_max = getdef_unum ("UID_MIN", 1000) - 1;
- uid_max = getdef_unum ("SYS_UID_MAX", uid_max);
+ uid_min = getdef_ulong ("SYS_UID_MIN", 1L);
+ uid_max = getdef_ulong ("UID_MIN", 1000L) - 1;
+ uid_max = getdef_ulong ("SYS_UID_MAX", (unsigned long) uid_max);
}
if ( (NULL != preferred_uid)
assert (gid != NULL);
if (!sys_group) {
- gid_min = getdef_unum ("GID_MIN", 1000);
- gid_max = getdef_unum ("GID_MAX", 60000);
+ gid_min = getdef_ulong ("GID_MIN", 1000L);
+ gid_max = getdef_ulong ("GID_MAX", 60000L);
} else {
- gid_min = getdef_unum ("SYS_GID_MIN", 1);
- gid_max = getdef_unum ("GID_MIN", 1000) - 1;
- gid_max = getdef_unum ("SYS_GID_MAX", gid_max);
+ gid_min = getdef_ulong ("SYS_GID_MIN", 1L);
+ gid_max = getdef_ulong ("GID_MIN", 1000L) - 1;
+ gid_max = getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max);
}
if ( (NULL != preferred_gid)