[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:21 UTC 2009
The following commit has been merged in the upstream branch:
commit b1342346d8b2541998608056990be8d63c3584c9
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;
}
--
fakeroot
More information about the Fakeroot-commits
mailing list