summaryrefslogtreecommitdiff
path: root/lib/uid_wrapper/uid_wrapper.c
diff options
context:
space:
mode:
authorbubulle <bubulle@alioth.debian.org>2011-06-07 20:43:08 +0000
committerbubulle <bubulle@alioth.debian.org>2011-06-07 20:43:08 +0000
commite64520a9ed05c9782a6e8ca8015fdef01b92ecc3 (patch)
treefc3a71a0b741cbcc6a5a892f91cc0f2218dfe656 /lib/uid_wrapper/uid_wrapper.c
parent6fe9013ae23927a67fa6b6033e2711cef99b3533 (diff)
downloadsamba-e64520a9ed05c9782a6e8ca8015fdef01b92ecc3.tar.gz
Revert upstream branch to 3.5.8....oops
git-svn-id: svn://svn.debian.org/svn/pkg-samba/branches/samba/upstream@3810 fc4039ab-9d04-0410-8cac-899223bdd6b0
Diffstat (limited to 'lib/uid_wrapper/uid_wrapper.c')
-rw-r--r--lib/uid_wrapper/uid_wrapper.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c
index c67679777c..f7f04316bf 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/lib/uid_wrapper/uid_wrapper.c
@@ -15,18 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef _SAMBA_BUILD_
-
#define UID_WRAPPER_NOT_REPLACE
-#include "../replace/replace.h"
-#include <talloc.h>
+#include "includes.h"
#include "system/passwd.h"
-
-#else /* _SAMBA_BUILD_ */
-
-#error uid_wrapper_only_supported_in_samba_yet
-
-#endif
+#include "system/filesys.h"
#ifndef _PUBLIC_
#define _PUBLIC_
@@ -52,7 +44,7 @@ static void uwrap_init(void)
uwrap.enabled = true;
/* put us in one group */
uwrap.ngroups = 1;
- uwrap.groups = talloc_array(NULL, gid_t, 1);
+ uwrap.groups = talloc_array(talloc_autofree_context(), gid_t, 1);
uwrap.groups[0] = 0;
}
}
@@ -116,7 +108,7 @@ _PUBLIC_ int uwrap_setgroups(size_t size, const gid_t *list)
uwrap.groups = NULL;
if (size != 0) {
- uwrap.groups = talloc_array(NULL, gid_t, size);
+ uwrap.groups = talloc_array(talloc_autofree_context(), gid_t, size);
if (uwrap.groups == NULL) {
errno = ENOMEM;
return -1;