[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. debian/1.14.3-200-gb232f8a

Clint Adams schizo at debian.org
Tue Aug 23 13:06:02 UTC 2011


The following commit has been merged in the upstream branch:
commit a4e7b9466d6a9236d107c30a52d7aa7b772316d5
Author: Clint Adams <schizo at debian.org>
Date:   Wed Nov 21 03:24:03 2007 +0000

    Apply patch from Andrew Benham to add mode support to fake_get_owner().  closes: #452225.
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-141

diff --git a/communicate.c b/communicate.c
index 3a64f23..73b3b48 100644
--- a/communicate.c
+++ b/communicate.c
@@ -807,8 +807,11 @@ int init_get_msg(){
   return msg_snd;
 }
 
+/* fake_get_owner() allows a process which has not set LD_PRELOAD to query
+   the fake ownership etc. of files.  That process needs to know the key
+   in use by faked - faked prints this at startup. */
 int fake_get_owner(int is_lstat, const char *key, const char *path,
-                  uid_t *uid, gid_t *gid){
+                  uid_t *uid, gid_t *gid, mode_t *mode){
   struct stat st;
   int i;
 
@@ -820,7 +823,7 @@ int fake_get_owner(int is_lstat, const char *key, const char *path,
   if (i < 0)
     return i;
 
-  /* Now give pass it to faked */
+  /* Now pass it to faked */
   get_ipc_key(atoi(key));
 #ifndef STUPID_ALPHA_HACK
   send_get_stat(&st);
@@ -828,11 +831,13 @@ int fake_get_owner(int is_lstat, const char *key, const char *path,
   send_get_stat(&st, _STAT_VER);
 #endif
 
-  /* Now return the values inside the pointers */
+  /* Return the values inside the pointers */
   if (uid)
     *uid = st.st_uid;
   if (gid)
     *gid = st.st_gid;
+  if (mode)
+    *mode = st.st_mode;
 
   return 0;
 }
diff --git a/debian/changelog b/debian/changelog
index 1561388..b099041 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ fakeroot (1.8.6) unstable; urgency=low
 
   * Apply patch from Andrew Benham to handle 64-bit builds on Solaris.
     closes: #452095.
+  * Apply patch from Andrew Benham to add mode support to
+    fake_get_owner().  closes: #452225.
 
  -- Clint Adams <schizo at debian.org>  Tue, 20 Nov 2007 21:56:58 -0500
 

-- 
fakeroot



More information about the Fakeroot-commits mailing list