Author: aurel32 Date: 2009-07-20 09:53:33 +0000 (Mon, 20 Jul 2009) New Revision: 3638
Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff Log: * kfreebsd/local-sysdeps.diff: update to revision 2652 (from glibc-bsd). Modified: glibc-package/trunk/debian/changelog =================================================================== --- glibc-package/trunk/debian/changelog 2009-07-19 22:11:34 UTC (rev 3637) +++ glibc-package/trunk/debian/changelog 2009-07-20 09:53:33 UTC (rev 3638) @@ -1,8 +1,8 @@ eglibc (2.9-22) UNSTABLE; urgency=low - * kfreebsd/local-sysdeps.diff: update to revision 2649 (from glibc-bsd). + * kfreebsd/local-sysdeps.diff: update to revision 2652 (from glibc-bsd). - -- Aurelien Jarno <[email protected]> Mon, 20 Jul 2009 00:09:57 +0200 + -- Aurelien Jarno <[email protected]> Mon, 20 Jul 2009 11:53:15 +0200 eglibc (2.9-21) unstable; urgency=low Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff =================================================================== --- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-07-19 22:11:34 UTC (rev 3637) +++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-07-20 09:53:33 UTC (rev 3638) @@ -1,5 +1,3 @@ -Binary files null/sysdeps/unix/bsd/bsd4.4/kfreebsd/.dl-sysdep.c.swp and b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/.dl-sysdep.c.swp differ -Binary files null/sysdeps/unix/bsd/bsd4.4/kfreebsd/.getsysstats.c.swp and b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/.getsysstats.c.swp differ --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Dist @@ -0,0 +1,30 @@ @@ -83,7 +81,7 @@ + +ifeq ($(subdir),io) +# For <unistd.h>. -+sysdep_routines += sys_access sys_fchownat sys_fexecve sys_getcwd sys_linkat sys_lseek sys_freebsd6_lseek sys_readlinkat sys_symlinkat sys_unlinkat ++sysdep_routines += sys_access sys_faccessat sys_fchownat sys_fexecve sys_getcwd sys_linkat sys_lseek sys_freebsd6_lseek sys_readlinkat sys_symlinkat sys_unlinkat +# For <fcntl.h>. +sysdep_routines += sys_open sys_openat open_2 +# For <sys/stat.h>. @@ -535,7 +533,7 @@ +#endif /* __A_OUT_GNU_H__ */ --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/access.c -@@ -0,0 +1,86 @@ +@@ -0,0 +1,68 @@ +/* Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + @@ -575,48 +573,30 @@ + discouraged. This wrapper implements the recommended behaviour. + */ + -+extern int __syscall_access (const char *path, mode_t mode); ++extern int __syscall_access (const char *path, int mode); +libc_hidden_proto (__syscall_access) + +int -+__access (path, mode) -+ const char *path; -+ int mode; ++__access (const char *path, int mode) +{ -+ uid_t uid; + struct stat64 stats; + -+ uid = __getuid(); -+ -+ if (uid != 0) ++ if ((__getuid() != 0) || !(mode & X_OK)) + return __syscall_access (path, mode); + ++ /* Althought the super-user can read and write any file, ++ the file-system might be i.e. read-only. Do the check. */ ++ ++ if (__syscall_access (path, mode)) ++ return -1; ++ + if (stat64 (path, &stats)) + return -1; + -+ mode &= (X_OK | W_OK | R_OK); /* Clear any bogus bits. */ -+#if R_OK != S_IROTH || W_OK != S_IWOTH || X_OK != S_IXOTH -+# error Oops, portability assumptions incorrect. -+#endif -+ -+ if (mode == F_OK) -+ return 0; /* The file exists. */ -+ -+ /* The super-user can read and write any file, and execute any file -+ that anyone can execute. */ -+ if ((mode & X_OK) == 0 || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) ++ /* The super-user can execute any file that anyone can execute. */ ++ if (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) + return 0; + -+ int granted = (uid == stats.st_uid -+ ? (unsigned int) (stats.st_mode & (mode << 6)) >> 6 -+ : (stats.st_gid == (__getgid ()) -+ || __group_member (stats.st_gid)) -+ ? (unsigned int) (stats.st_mode & (mode << 3)) >> 3 -+ : (stats.st_mode & mode)); -+ -+ if (granted == mode) -+ return 0; -+ + __set_errno (EACCES); + return -1; +} @@ -8225,7 +8205,7 @@ +#endif --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/faccessat.c -@@ -0,0 +1,164 @@ +@@ -0,0 +1,163 @@ +/* Test for access to file, relative to open directory. Linux version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -8257,8 +8237,7 @@ +#include <kernel-features.h> +#include <sysdep.h> + -+extern int __syscall_faccessat (int fd, const char *path, mode_t mode, -+ int flag); ++extern int __syscall_faccessat (int fd, const char *path, int mode, int flag); +libc_hidden_proto (__syscall_faccessat) + +int @@ -10042,7 +10021,7 @@ + return 0; +} + -+weak_alias (__getdomainname getdomainname) ++weak_alias (__getdomainname, getdomainname) --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getfsstat.c @@ -0,0 +1,49 @@ -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

