]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Always call the syscall with the old semantic.
authorUlrich Drepper <drepper@redhat.com>
Sun, 8 Mar 1998 17:36:16 +0000 (17:36 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 8 Mar 1998 17:36:16 +0000 (17:36 +0000)
sysdeps/unix/sysv/linux/chown.c

index f380d93736a18c946b91b8d81ae681e1bc6fcc7a..1baae56290735e6a35339bd2c15bdc2460e0e0cb 100644 (file)
   was introduced.  The new chown now follows symlinks - the old chown and the
   new lchown do not follow symlinks.
   The new lchown function has the same number as the old chown had and the
-  new chown has a new number.  When compiling with headers from Linux > 2.1.8x
-  it's impossible to run this libc with older kernels.  In these cases libc
-  has therefore to route calls to chown to the old chown function.
+  new chown has a new number.  To preserve compatibility with old glibc 2.0
+  versions we always call the syscall with the old semantic.
 */
 
 extern int __syscall_chown (const char *__file,
                            uid_t __owner, gid_t __group);
 #ifdef __NR_lchown
 /* running under Linux 2.0 or < 2.1.8x */
-static int __libc_old_chown;
-
-
 int
 __chown (const char *file, uid_t owner, gid_t group)
 {
-  int result;
-
-  if (!__libc_old_chown)
-    {
-      int saved_errno = errno;
-      result = __syscall_chown (file, owner, group);
-
-      if (result >= 0 || errno != ENOSYS)
-       return result;
-
-      __set_errno (saved_errno);
-      __libc_old_chown = 1;
-    }
-
   return __lchown (file, owner, group);
 }
 #else