[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Fri Feb 5 11:50:07 MST 2010


The branch, master has been updated
       via  e4d29bb... s4:UID wrapper - Make it work on older distributions
       via  16aa074... s4:UID wrapper - Fix includes
       via  a51d750... NSS wrapper - add dependency to "nsstest"
       via  44b95bc... s4:Heimdal build - never require the NSS wrapper for Heimdal Kerberos
      from  f9f1db1... s3: normalize "Changing password for" msg IDs and STRs

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e4d29bb4fd0564c39863b56c1a285d6e23e257ab
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jan 30 14:25:51 2010 +0100

    s4:UID wrapper - Make it work on older distributions
    
    On my older CentOS 4 installation I had the problem with the missing
    substitution prototypes ("uwrap_*"). So I added them to "uid_wrapper.h".
    
    Also, I made the head of the "uid_wrapper.c" file more like the one of
    "nss_wrapper.c" - it shouldn't change that much, I did it only to be consistent.
    
    This patch should fix the build on older distributions while keep it running on
    newer ones.

commit 16aa0744c6820c5400b73fd4889608c38fc55b39
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jan 30 14:25:51 2010 +0100

    s4:UID wrapper - Fix includes
    
    The includes of the UID wrapper headers werent't really efficient according
    to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html).
    To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c",
     "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".

commit a51d750652671a41a2828b80feaa9e4d81219002
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jan 30 14:18:57 2010 +0100

    NSS wrapper - add dependency to "nsstest"
    
    The code part makes use of the "NSS wrapper" if it is enabled. Surprisingly
    the build process doesn't break with the missing dependency on more recent
    systems. But with an older CentOS 4 installation it has been broken.
    This patch should fix the problem on older distributions while keep the build
    running on newer ones.

commit 44b95bc72777ab42f2b089f37b0b84b3b4c0736c
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Fri Feb 5 16:58:32 2010 +0100

    s4:Heimdal build - never require the NSS wrapper for Heimdal Kerberos
    
    Disable the use of it in the heimdal code.
    
    Notice: This doesn't need to be ported upstream since it only affects the
    build in conjunction with s4.

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

Summary of changes:
 lib/uid_wrapper/uid_wrapper.c       |   12 ++++++++++--
 lib/uid_wrapper/uid_wrapper.h       |   12 ++++++++++--
 lib/util/unix_privs.c               |   11 ++++++++++-
 lib/util/util.c                     |    9 +++++++++
 nsswitch/config.mk                  |    3 ++-
 source4/heimdal_build/config.h      |    9 ---------
 source4/heimdal_build/internal.mk   |   10 +++++-----
 source4/include/includes.h          |    9 ---------
 source4/ntvfs/posix/pvfs_acl.c      |    8 ++++++++
 source4/ntvfs/unixuid/vfs_unixuid.c |   10 ++++++++++
 10 files changed, 64 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c
index f7f0431..93ebb7c 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/lib/uid_wrapper/uid_wrapper.c
@@ -15,10 +15,18 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifdef _SAMBA_BUILD_
+
 #define UID_WRAPPER_NOT_REPLACE
-#include "includes.h"
+#include "../replace/replace.h"
+#include <talloc.h>
 #include "system/passwd.h"
-#include "system/filesys.h"
+
+#else /* _SAMBA_BUILD_ */
+
+#error uid_wrapper_only_supported_in_samba_yet
+
+#endif
 
 #ifndef _PUBLIC_
 #define _PUBLIC_
diff --git a/lib/uid_wrapper/uid_wrapper.h b/lib/uid_wrapper/uid_wrapper.h
index 5d7c99d..3d42223 100644
--- a/lib/uid_wrapper/uid_wrapper.h
+++ b/lib/uid_wrapper/uid_wrapper.h
@@ -18,6 +18,16 @@
 #ifndef __UID_WRAPPER_H__
 #define __UID_WRAPPER_H__
 
+int uwrap_enabled(void);
+int uwrap_seteuid(uid_t euid);
+uid_t uwrap_geteuid(void);
+int uwrap_setegid(gid_t egid);
+uid_t uwrap_getegid(void);
+int uwrap_setgroups(size_t size, const gid_t *list);
+int uwrap_getgroups(int size, gid_t *list);
+uid_t uwrap_getuid(void);
+gid_t uwrap_getgid(void);
+
 #ifdef seteuid
 #undef seteuid
 #endif
@@ -58,6 +68,4 @@
 #endif
 #define getgid	uwrap_getgid
 
-int uwrap_enabled(void);
-
 #endif /* __UID_WRAPPER_H__ */
diff --git a/lib/util/unix_privs.c b/lib/util/unix_privs.c
index f55e739..b30b2f5 100644
--- a/lib/util/unix_privs.c
+++ b/lib/util/unix_privs.c
@@ -20,9 +20,18 @@
 */
 
 #include "includes.h"
-#include "system/filesys.h"
+#include "system/passwd.h"
 #include "../lib/util/unix_privs.h"
 
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
+
 /**
  * @file
  * @brief Gaining/losing root privileges
diff --git a/lib/util/util.c b/lib/util/util.c
index 67b166b..25e0108 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -31,6 +31,15 @@
 #undef strdup
 #undef realloc
 
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
+
 /**
  * @file
  * @brief Misc utility functions
diff --git a/nsswitch/config.mk b/nsswitch/config.mk
index 9ad873b..c1c9378 100644
--- a/nsswitch/config.mk
+++ b/nsswitch/config.mk
@@ -11,7 +11,8 @@ INSTALLDIR = BINDIR
 PRIVATE_DEPENDENCIES = \
 		LIBSAMBA-UTIL \
 		LIBREPLACE_EXT \
-		LIBSAMBA-HOSTCONFIG
+		LIBSAMBA-HOSTCONFIG \
+		NSS_WRAPPER
 # End BINARY nsstest
 #################################
 
diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h
index 8e9501b..be544cb 100644
--- a/source4/heimdal_build/config.h
+++ b/source4/heimdal_build/config.h
@@ -27,15 +27,6 @@
 
 #undef HAVE_KRB5_ENCRYPT_BLOCK
 
-#if defined(UID_WRAPPER)
-#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
-#define UID_WRAPPER_REPLACE
-#include "../uid_wrapper/uid_wrapper.h"
-#endif
-#else
-#define uwrap_enabled() 0
-#endif
-
 /*Workaround for heimdal define vs samba define*/
 #ifdef HAVE_LIBINTL_H
 #define LIBINTL
diff --git a/source4/heimdal_build/internal.mk b/source4/heimdal_build/internal.mk
index 7e85b97..843bb85 100644
--- a/source4/heimdal_build/internal.mk
+++ b/source4/heimdal_build/internal.mk
@@ -586,12 +586,12 @@ $(HEIMDAL_ROKEN_CLOSEFROM_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimda
 HEIMDAL_ROKEN_PROGNAME_H_OBJ_FILES = \
 			$(heimdalsrcdir)/lib/roken/getprogname.ho \
 			$(heimdalsrcdir)/lib/roken/setprogname.ho
-$(HEIMDAL_ROKEN_PROGNAME_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+$(HEIMDAL_ROKEN_PROGNAME_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1
 
 [SUBSYSTEM::HEIMDAL_ROKEN_CLOSEFROM_H]
 
 HEIMDAL_ROKEN_CLOSEFROM_H_OBJ_FILES = $(heimdalsrcdir)/lib/roken/closefrom.ho
-$(HEIMDAL_ROKEN_CLOSEFROM_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+$(HEIMDAL_ROKEN_CLOSEFROM_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1
 
 #######################
 # Start SUBSYSTEM HEIMDAL_ROKEN
@@ -645,7 +645,7 @@ HEIMDAL_ROKEN_OBJ_FILES = \
 $(HEIMDAL_ROKEN_OBJ_FILES) $(HEIMDAL_ROKEN_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/roken/roken.h
 
 [SUBSYSTEM::HEIMDAL_ROKEN_H]
-CFLAGS =  -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+CFLAGS =  -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1
 PRIVATE_DEPENDENCIES = \
 			HEIMDAL_ROKEN_PROGNAME_H \
 			HEIMDAL_ROKEN_CLOSEFROM_H \
@@ -704,7 +704,7 @@ asn1_compile_OBJ_FILES = \
 	$(asn1_compile_ASN1_OBJ_FILES) \
 	$(heimdalsrcdir)/lib/vers/print_version.ho
 
-$(asn1_compile_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/asn1 -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+$(asn1_compile_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/asn1 -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1
 
 $(eval $(call heimdal_proto_header_template, \
   $(heimdalsrcdir)/lib/asn1/der-protos.h, \
@@ -731,7 +731,7 @@ compile_et_OBJ_FILES = $(heimdalsrcdir)/lib/vers/print_version.ho \
 	$(heimdalsrcdir)/lib/com_err/lex.ho \
 	$(heimdalsrcdir)/lib/com_err/compile_et.ho
 
-$(compile_et_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/com_err -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+$(compile_et_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/com_err -I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1
 
 $(heimdalsrcdir)/lib/com_err/lex.c:: $(heimdalsrcdir)/lib/com_err/parse.c
 dist:: $(heimdalsrcdir)/lib/com_err/lex.c
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 8d28808..796e313 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -69,13 +69,4 @@
 #include "../lib/util/smb_threads.h"
 #include "../lib/util/smb_threads_internal.h"
 
-#if defined(UID_WRAPPER)
-#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
-#define UID_WRAPPER_REPLACE
-#include "../uid_wrapper/uid_wrapper.h"
-#endif
-#else
-#define uwrap_enabled() 0
-#endif
-
 #endif /* _INCLUDES_H */
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index c20358b..c100abe 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -26,6 +26,14 @@
 #include "libcli/security/security.h"
 #include "param/param.h"
 
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
 
 /* the list of currently registered ACL backends */
 static struct pvfs_acl_backend {
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index 8102c99..85c70d7 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -29,6 +29,16 @@
 #define TEVENT_DEPRECATED
 #include <tevent.h>
 
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
+
+
 struct unixuid_private {
 	struct wbc_context *wbc_ctx;
 	struct unix_sec_ctx *last_sec_ctx;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list