diff options
Diffstat (limited to 'lib/uid_wrapper/uid_wrapper.c')
-rw-r--r-- | lib/uid_wrapper/uid_wrapper.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c index f7f04316bf..c67679777c 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_ @@ -44,7 +52,7 @@ static void uwrap_init(void) uwrap.enabled = true; /* put us in one group */ uwrap.ngroups = 1; - uwrap.groups = talloc_array(talloc_autofree_context(), gid_t, 1); + uwrap.groups = talloc_array(NULL, gid_t, 1); uwrap.groups[0] = 0; } } @@ -108,7 +116,7 @@ _PUBLIC_ int uwrap_setgroups(size_t size, const gid_t *list) uwrap.groups = NULL; if (size != 0) { - uwrap.groups = talloc_array(talloc_autofree_context(), gid_t, size); + uwrap.groups = talloc_array(NULL, gid_t, size); if (uwrap.groups == NULL) { errno = ENOMEM; return -1; |