merge of parameter changes from 3.0 and fix for bug 550
authorGerald Carter <jerry@samba.org>
Wed, 1 Oct 2003 17:02:09 +0000 (17:02 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 1 Oct 2003 17:02:09 +0000 (17:02 +0000)
(This used to be commit b6433f5db77a1d62309946c6f23c18c6c299d0c5)

source3/lib/system.c
source3/lib/system_smbd.c
source3/param/loadparm.c

index b020a20373054b8233fe4a09409598f4fe30b29b..2e95efec79b4f08c14bb08b92a8f6f15a8c5bd93 100644 (file)
@@ -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()
 ****************************************************************************/
index bcbc8c61e6418acaa852ce818e50a8461d0001c4..73c910e631d2e261317ba3d8f44acbc0a1b9b5cc 100644 (file)
@@ -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");
index 0efa2796c36e08f74b7c22c9633efa2d0a16b35f..45626192dbe9ce78afff468878a8d8ab85714d5e 100644 (file)
@@ -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;