summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-01 17:02:09 +0000
committerGerald Carter <jerry@samba.org>2003-10-01 17:02:09 +0000
commite1f16f33219b44f0a66af0da0a02d8e8781a24f6 (patch)
tree46e60608c6e69cb3daf062010754c52ff4168a3c
parent0dde70c2330b7fad898f27ba3102f425a8e5f579 (diff)
downloadsamba-e1f16f33219b44f0a66af0da0a02d8e8781a24f6.tar.gz
samba-e1f16f33219b44f0a66af0da0a02d8e8781a24f6.tar.bz2
samba-e1f16f33219b44f0a66af0da0a02d8e8781a24f6.zip
merge of parameter changes from 3.0 and fix for bug 550
(This used to be commit b6433f5db77a1d62309946c6f23c18c6c299d0c5)
-rw-r--r--source3/lib/system.c8
-rw-r--r--source3/lib/system_smbd.c2
-rw-r--r--source3/param/loadparm.c5
3 files changed, 7 insertions, 8 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index b020a20373..2e95efec79 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -693,7 +693,6 @@ int sys_getgroups(int setlen, gid_t *gidset)
#endif /* HAVE_BROKEN_GETGROUPS */
}
-#ifdef HAVE_SETGROUPS
/**************************************************************************
Wrapper for setgroups. Deals with broken (int) case. Automatically used
@@ -702,6 +701,11 @@ int sys_getgroups(int setlen, gid_t *gidset)
int sys_setgroups(int setlen, gid_t *gidset)
{
+#if !defined(HAVE_SETGROUPS)
+ errno = ENOSYS;
+ return -1;
+#endif /* HAVE_SETGROUPS */
+
#if !defined(HAVE_BROKEN_GETGROUPS)
return setgroups(setlen, gidset);
#else
@@ -742,8 +746,6 @@ int sys_setgroups(int setlen, gid_t *gidset)
#endif /* HAVE_BROKEN_GETGROUPS */
}
-#endif /* HAVE_SETGROUPS */
-
/**************************************************************************
Wrappers for setpwent(), getpwent() and endpwent()
****************************************************************************/
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index bcbc8c61e6..73c910e631 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -92,7 +92,7 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
restore_re_gid();
- if (setgroups(ngrp_saved, gids_saved) != 0) {
+ if (sys_setgroups(ngrp_saved, gids_saved) != 0) {
/* yikes! */
DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n"));
smb_panic("getgrouplist: failed to reset group list!\n");
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 0efa2796c3..45626192db 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -185,7 +185,6 @@ typedef struct
int mangle_prefix;
int max_log_size;
char *szLogLevel;
- int mangled_stack;
int max_xmit;
int max_mux;
int max_open_files;
@@ -972,7 +971,6 @@ static struct parm_struct parm_table[] = {
{"mangling method", P_STRING, P_GLOBAL, &Globals.szManglingMethod, NULL, NULL, FLAG_ADVANCED},
{"mangle prefix", P_INTEGER, P_GLOBAL, &Globals.mangle_prefix, NULL, NULL, FLAG_ADVANCED},
- {"mangled stack", P_INTEGER, P_GLOBAL, &Globals.mangled_stack, NULL, NULL, FLAG_ADVANCED},
{"default case", P_ENUM, P_LOCAL, &sDefault.iDefaultCase, NULL, enum_case, FLAG_ADVANCED | FLAG_SHARE},
{"case sensitive", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"casesignames", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_HIDE},
@@ -992,7 +990,7 @@ static struct parm_struct parm_table[] = {
{"map hidden", P_BOOL, P_LOCAL, &sDefault.bMap_hidden, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"map archive", P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"mangled names", P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
- {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
+ {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_DEPRECATED },
{"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, FLAG_ADVANCED},
{"Domain Options", P_SEP, P_SEPARATOR},
@@ -1361,7 +1359,6 @@ static void init_globals(void)
Globals.AlgorithmicRidBase = BASE_RID;
Globals.bLoadPrinters = True;
- Globals.mangled_stack = 50;
/* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */
/* Discovered by 2 days of pain by Don McCall @ HP :-). */
Globals.max_xmit = 0x4104;