]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove shortcut for call of chown
authorUlrich Drepper <drepper@gmail.com>
Mon, 16 May 2011 05:43:56 +0000 (06:43 +0100)
committerPetr Baudis <pasky@ucw.cz>
Thu, 26 May 2011 23:38:30 +0000 (01:38 +0200)
The UID might differ, too.  Just call chown unconditionally.

(cherry picked from commit f3799213a3ee8265ba47fad33d9cff71d97ab0d4)

ChangeLog
login/programs/pt_chown.c

index 884b21e766b365fa4084b8050faa45345f56ec20..0609c9183aa1b19856e44b688136a60b443a2b32 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-16  Ulrich Drepper  <drepper@gmail.com>
+
+       [BZ #11697]
+       * login/programs/pt_chown.c (do_pt_chown): Always call chown.
+
 2011-05-14  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #12083]
index 4c36f2ceac7d5408d255c39f25efe989942a4a2d..9aa34e7cefc55d01e7a933ec70cf1b3b2d9898c6 100644 (file)
@@ -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,