remove unused and misleading 'owner' argument from find_new_sub*
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
This commit is contained in:
parent
942f1945bb
commit
25b1a8d591
@ -161,12 +161,10 @@ extern int find_new_uid (bool sys_user,
|
||||
|
||||
#ifdef ENABLE_SUBIDS
|
||||
/* find_new_sub_gids.c */
|
||||
extern int find_new_sub_gids (const char *owner,
|
||||
gid_t *range_start, unsigned long *range_count);
|
||||
extern int find_new_sub_gids (gid_t *range_start, unsigned long *range_count);
|
||||
|
||||
/* find_new_sub_uids.c */
|
||||
extern int find_new_sub_uids (const char *owner,
|
||||
uid_t *range_start, unsigned long *range_count);
|
||||
extern int find_new_sub_uids (uid_t *range_start, unsigned long *range_count);
|
||||
#endif /* ENABLE_SUBIDS */
|
||||
|
||||
|
||||
|
@ -46,8 +46,7 @@
|
||||
*
|
||||
* Return 0 on success, -1 if no unused GIDs are available.
|
||||
*/
|
||||
int find_new_sub_gids (const char *owner,
|
||||
gid_t *range_start, unsigned long *range_count)
|
||||
int find_new_sub_gids (gid_t *range_start, unsigned long *range_count)
|
||||
{
|
||||
unsigned long min, max;
|
||||
unsigned long count;
|
||||
|
@ -46,8 +46,7 @@
|
||||
*
|
||||
* Return 0 on success, -1 if no unused UIDs are available.
|
||||
*/
|
||||
int find_new_sub_uids (const char *owner,
|
||||
uid_t *range_start, unsigned long *range_count)
|
||||
int find_new_sub_uids (uid_t *range_start, unsigned long *range_count)
|
||||
{
|
||||
unsigned long min, max;
|
||||
unsigned long count;
|
||||
|
@ -1251,7 +1251,7 @@ int main (int argc, char **argv)
|
||||
if (is_sub_uid && !sub_uid_assigned(fields[0])) {
|
||||
uid_t sub_uid_start = 0;
|
||||
unsigned long sub_uid_count = 0;
|
||||
if (find_new_sub_uids(fields[0], &sub_uid_start, &sub_uid_count) == 0) {
|
||||
if (find_new_sub_uids(&sub_uid_start, &sub_uid_count) == 0) {
|
||||
if (sub_uid_add(fields[0], sub_uid_start, sub_uid_count) == 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to prepare new %s entry\n"),
|
||||
@ -1271,7 +1271,7 @@ int main (int argc, char **argv)
|
||||
if (is_sub_gid && !sub_gid_assigned(fields[0])) {
|
||||
gid_t sub_gid_start = 0;
|
||||
unsigned long sub_gid_count = 0;
|
||||
if (find_new_sub_gids(fields[0], &sub_gid_start, &sub_gid_count) == 0) {
|
||||
if (find_new_sub_gids(&sub_gid_start, &sub_gid_count) == 0) {
|
||||
if (sub_gid_add(fields[0], sub_gid_start, sub_gid_count) == 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to prepare new %s entry\n"),
|
||||
|
@ -2465,7 +2465,7 @@ int main (int argc, char **argv)
|
||||
|
||||
#ifdef ENABLE_SUBIDS
|
||||
if (is_sub_uid) {
|
||||
if (find_new_sub_uids(user_name, &sub_uid_start, &sub_uid_count) < 0) {
|
||||
if (find_new_sub_uids(&sub_uid_start, &sub_uid_count) < 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: can't create subordinate user IDs\n"),
|
||||
Prog);
|
||||
@ -2473,7 +2473,7 @@ int main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
if (is_sub_gid) {
|
||||
if (find_new_sub_gids(user_name, &sub_gid_start, &sub_gid_count) < 0) {
|
||||
if (find_new_sub_gids(&sub_gid_start, &sub_gid_count) < 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: can't create subordinate group IDs\n"),
|
||||
Prog);
|
||||
|
Loading…
Reference in New Issue
Block a user