diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-16 01:43:56 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-05-16 01:43:56 -0400 |
commit | f3799213a3ee8265ba47fad33d9cff71d97ab0d4 (patch) | |
tree | 695f4326a64115c12a877699984be3cea6a64a19 /login | |
parent | d79a9c949c84e7f0ba33e87447c47af833e9f11a (diff) | |
download | glibc-f3799213a3ee8265ba47fad33d9cff71d97ab0d4.tar.gz |
Remove shortcut for call of chown
The UID might differ, too. Just call chown unconditionally.
Diffstat (limited to 'login')
-rw-r--r-- | login/programs/pt_chown.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/login/programs/pt_chown.c b/login/programs/pt_chown.c index 4c36f2ceac..9aa34e7cef 100644 --- a/login/programs/pt_chown.c +++ b/login/programs/pt_chown.c @@ -64,7 +64,7 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "1999"); +"), "2011"); } static char * @@ -123,7 +123,7 @@ do_pt_chown (void) /* Set the owner to the real user ID, and the group to that special group ID. */ - if (st.st_gid != gid && chown (pty, getuid (), gid) < 0) + if (chown (pty, getuid (), gid) < 0) return FAIL_EACCES; /* Set the permission mode to readable and writable by the owner, |