[SCM] UID Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Nov 3 15:39:29 UTC 2015


The branch, master has been updated
       via  18a6057 doc: Document missing options
      from  4ae5073 Bump version to 1.2.0

https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 18a60576e396c3944b72a5e631957393a5db05b1
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Nov 3 10:54:07 2015 +0100

    doc: Document missing options
    
    Signed-off-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 doc/uid_wrapper.1     | 43 ++++++++++++++++++++++++++++++++++++++++---
 doc/uid_wrapper.1.txt | 36 ++++++++++++++++++++++++++++++++++--
 2 files changed, 74 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/doc/uid_wrapper.1 b/doc/uid_wrapper.1
index 0faff95..c66d143 100644
--- a/doc/uid_wrapper.1
+++ b/doc/uid_wrapper.1
@@ -2,12 +2,12 @@
 .\"     Title: uid_wrapper
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 2014-07-11
+.\"      Date: 2015-11-03
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "UID_WRAPPER" "1" "2014\-07\-11" "\ \&" "\ \&"
+.TH "UID_WRAPPER" "1" "2015\-11\-03" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -139,6 +139,25 @@ If you need to see what is going on in uid_wrapper itself or try to find a bug,
 3 = TRACE
 .RE
 .RE
+.PP
+\fBUID_WRAPPER_MYUID\fR
+.RS 4
+This environment variable can be used to tell uid_wrapper to let geteuid() return the real (instead of the faked) UID of the user who started the process with uid_wrapper\&.
+.RE
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+uid_t uid;
+
+setenv("UID_WRAPPER_MYUID", "1", 1);
+uid = geteuid();
+unsetenv("UID_WRAPPER_MYUID");
+.fi
+.if n \{\
+.RE
+.\}
 .SH "EXAMPLE"
 .sp
 .if n \{\
@@ -146,8 +165,26 @@ If you need to see what is going on in uid_wrapper itself or try to find a bug,
 .\}
 .nf
 $ LD_PRELOAD=libuid_wrapper\&.so UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id
-uid=0(root) gid=0(root) groups=100(users),0(root)
+uid=0(root) gid=0(root) 0(root)
 .fi
 .if n \{\
 .RE
 .\}
+.SH "WORKAROUNDS"
+.sp
+If you need to write code that behaves differently depending on whether uid_wrapper is enabled or not, for example in cases where you have to file permissions, you can predefine the uid_wrapper_enabled() function in your project as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+bool uid_wrapper_enabled(void)
+{
+    return false;
+}
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Since uid_wrapper overloads this function if enabled, you can use it in your code to detect uid_wrapper\&.
diff --git a/doc/uid_wrapper.1.txt b/doc/uid_wrapper.1.txt
index dec69e6..699d2c1 100644
--- a/doc/uid_wrapper.1.txt
+++ b/doc/uid_wrapper.1.txt
@@ -1,6 +1,6 @@
 uid_wrapper(1)
 ==============
-:revdate: 2014-07-11
+:revdate: 2015-11-03
 
 NAME
 ----
@@ -50,8 +50,40 @@ debug symbols.
 - 2 = DEBUG
 - 3 = TRACE
 
+*UID_WRAPPER_MYUID*::
+
+This environment variable can be used to tell uid_wrapper to let geteuid()
+return the real (instead of the faked) UID of the user who started the process
+with uid_wrapper.
+
+--------------------------------------
+uid_t uid;
+
+setenv("UID_WRAPPER_MYUID", "1", 1);
+uid = geteuid();
+unsetenv("UID_WRAPPER_MYUID");
+--------------------------------------
+
 EXAMPLE
 -------
 
   $ LD_PRELOAD=libuid_wrapper.so UID_WRAPPER=1 UID_WRAPPER_ROOT=1 id
-  uid=0(root) gid=0(root) groups=100(users),0(root)
+  uid=0(root) gid=0(root) 0(root)
+
+WORKAROUNDS
+-----------
+
+If you need to write code that behaves differently depending on whether
+uid_wrapper is  enabled or not, for example in cases where you have to file
+permissions, you can predefine the uid_wrapper_enabled() function in your
+project as follows:
+
+--------------------------------------
+bool uid_wrapper_enabled(void)
+{
+    return false;
+}
+--------------------------------------
+
+Since uid_wrapper overloads this function if enabled, you can use it in your
+code to detect uid_wrapper.


-- 
UID Wrapper Repository



More information about the samba-cvs mailing list