From 58e5e1ea8d4c5a9eb8d36aa8132fd1ba3985ca53 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Aug 2009 11:21:06 +1000 Subject: make the UID_WRAPPER skip checks at runtime This fixes two issues pointed out by Andrew. It adds a runtime uwrap_enabled() call that wraps the skips needed for uid emulation. It also makes the skip in the directory_create_or_exist() function only change the uid checking code, not the permissions code --- lib/uid_wrapper/uid_wrapper.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/uid_wrapper/uid_wrapper.c') diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c index e009fa0b5c..948ff65b35 100644 --- a/lib/uid_wrapper/uid_wrapper.c +++ b/lib/uid_wrapper/uid_wrapper.c @@ -45,6 +45,13 @@ static void uwrap_init(void) } } +#undef uwrap_enabled +_PUBLIC_ int uwrap_enabled(void) +{ + uwrap_init(); + return uwrap.enabled?1:0; +} + _PUBLIC_ int uwrap_seteuid(uid_t euid) { uwrap_init(); -- cgit