coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreutils-8.20.patch003


From: Alexey Potehin
Subject: coreutils-8.20.patch003
Date: Sun, 10 Feb 2013 22:36:31 +0400

Hello people!

This is path for chown speedup (chown only if (newuid != olduid) and (newgid != oldgid)), in attach too:

--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -402,6 +402,12 @@ change_file_owner (FTS *fts, FTSENT *ent,
.
   if (do_chown)
     {
+       if ((uid == file_stats->st_uid) && (gid == file_stats->st_gid))
+         do_chown = false; // skip set permissions
+    }
+
+  if (do_chown)
+    {
       if ( ! chopt->affect_symlink_referent)
         {
           ok = (lchownat (fts->fts_cwd_fd, file, uid, gid) == 0);

Attachment: coreutils-8.20.patch003.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]