New module 'get-rusage-as'.
[pspp] / lib / fchownat.c
index 00126acf0910993e2690f0aac92ee0db9cf832e8..8884b97ae3a66508b2628fe6592e4f901ff743cd 100644 (file)
@@ -4,7 +4,7 @@
    when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it
    mistakenly affects the symlink referent, rather than the symlink itself.
 
-   Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -88,6 +88,13 @@ rpl_fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag)
   if (flag == AT_SYMLINK_NOFOLLOW)
     return local_lchownat (fd, file, owner, group);
 # endif
+# if FCHOWNAT_EMPTY_FILENAME_BUG
+  if (file[0] == '\0')
+    {
+      errno = ENOENT;
+      return -1;
+    }
+# endif
 # if CHOWN_TRAILING_SLASH_BUG
   {
     size_t len = strlen (file);