Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
coreutils
coreutils-invalid-ids.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File coreutils-invalid-ids.patch of Package coreutils
While uid_t and gid_t are both unsigned, the values (uid_t) -1 and (gid_t) -1 are reserved. A uid or gid argument of -1 to the chown(2) system call means to leave the uid/gid unchanged. Catch this case so that trying to set a uid or gid to -1 will result in an error. Test cases: chown 4294967295 file chown :4294967295 file chgrp 4294967295 file Andreas Gruenbacher <agruen@suse.de> Index: src/chgrp.c =================================================================== --- src/chgrp.c.orig 2012-03-24 19:22:13.000000000 +0100 +++ src/chgrp.c 2012-04-16 13:22:03.004026462 +0200 @@ -88,7 +88,7 @@ parse_group (const char *name) { unsigned long int tmp; if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK - && tmp <= GID_T_MAX)) + && tmp <= GID_T_MAX && (gid_t) tmp != (gid_t) -1)) error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name)); gid = tmp; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor