Cast to gid_t for groups not uid_t

This commit is contained in:
Baptiste Daroussin 2015-05-31 22:12:31 +00:00
parent 68cea7d570
commit 6138e089bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283843

View File

@ -116,7 +116,7 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args)
char *fmems[1];
fmems[0] = NULL;
fakegroup.gr_name = a_name ? a_name->val : "nogroup";
fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (uid_t)-1;
fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (gid_t)-1;
fakegroup.gr_mem = fmems;
return print_group(&fakegroup, getarg(args, 'P') != NULL);
}