FreeBSD Bugzilla – Attachment 71556 Details for
Bug 104200
[Maintainer Update] Small fixes to net/samba3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
samba3.diff
samba3.diff (text/plain), 6.19 KB, created by
Timur I. Bakeyev
on 2006-10-09 08:30:20 UTC
(
hide
)
Description:
samba3.diff
Filename:
MIME Type:
Creator:
Timur I. Bakeyev
Created:
2006-10-09 08:30:20 UTC
Size:
6.19 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/net/samba3/Makefile,v >retrieving revision 1.153 >diff -u -r1.153 Makefile >--- Makefile 19 Sep 2006 01:39:20 -0000 1.153 >+++ Makefile 9 Oct 2006 00:32:38 -0000 >@@ -7,7 +7,7 @@ > > PORTNAME= samba > PORTVERSION?= 3.0.23c >-PORTREVISION?= 0 >+PORTREVISION?= 1 > PORTEPOCH?= 1 > CATEGORIES?= net > MASTER_SITES= ${MASTER_SITE_SAMBA} >Index: files/patch-za >=================================================================== >RCS file: files/patch-za >diff -N files/patch-za >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-za 8 Oct 2006 19:22:09 -0000 >@@ -0,0 +1,129 @@ >+--- nsswitch/wb_common.c.orig Thu Apr 20 04:29:21 2006 >++++ nsswitch/wb_common.c Mon Sep 25 12:49:04 2006 >+@@ -525,15 +525,11 @@ >+ NSS_STATUS winbindd_send_request(int req_type, struct winbindd_request *request) >+ { >+ struct winbindd_request lrequest; >+- char *env; >+- int value; >+- >++ >+ /* Check for our tricky environment variable */ >+ >+- if ( (env = getenv(WINBINDD_DONT_ENV)) != NULL ) { >+- value = atoi(env); >+- if ( value == 1 ) >+- return NSS_STATUS_NOTFOUND; >++ if (winbind_env_set()) { >++ return NSS_STATUS_NOTFOUND; >+ } >+ >+ if (!request) { >+@@ -632,3 +628,14 @@ >+ return putenv(s) != -1; >+ } >+ >++BOOL winbind_env_set( void ) >++{ >++ char *env; >++ >++ if ((env=getenv(WINBINDD_DONT_ENV)) != NULL) { >++ if(strequal(env, "1")) { >++ return True; >++ } >++ } >++ return False; >++} >+--- passdb/pdb_interface.c.orig Wed Aug 23 18:16:38 2006 >++++ passdb/pdb_interface.c Mon Sep 25 13:10:15 2006 >+@@ -1321,27 +1321,25 @@ >+ struct group *grp; >+ char **gr; >+ struct passwd *pwd; >+- char *winbindd_env; >++ BOOL winbind_env; >+ >+ *pp_uids = NULL; >+ *p_num = 0; >+ >+ /* We only look at our own sam, so don't care about imported stuff */ >+- >+- winbindd_env = getenv(WINBINDD_DONT_ENV); >++ winbind_env = winbind_env_set(); >+ winbind_off(); >+ >+ if ((grp = getgrgid(gid)) == NULL) { >+ /* allow winbindd lookups, but only if they weren't already disabled */ >+- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >++ if (!winbind_env) { >+ winbind_on(); >+ } >+- >++ >+ return False; >+ } >+ >+ /* Primary group members */ >+- >+ setpwent(); >+ while ((pwd = getpwent()) != NULL) { >+ if (pwd->pw_gid == gid) { >+@@ -1352,7 +1350,6 @@ >+ endpwent(); >+ >+ /* Secondary group members */ >+- >+ for (gr = grp->gr_mem; (*gr != NULL) && ((*gr)[0] != '\0'); gr += 1) { >+ struct passwd *pw = getpwnam(*gr); >+ >+@@ -1362,11 +1359,10 @@ >+ } >+ >+ /* allow winbindd lookups, but only if they weren't already disabled */ >+- >+- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >++ if (!winbind_env) { >+ winbind_on(); >+ } >+- >++ >+ return True; >+ } >+ >+--- lib/system_smbd.c.orig Thu Apr 20 04:29:23 2006 >++++ lib/system_smbd.c Mon Sep 25 12:53:54 2006 >+@@ -120,19 +120,15 @@ >+ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) >+ { >+ int retval; >+- char *winbindd_env; >++ BOOL winbind_env; >+ >+ DEBUG(10,("sys_getgrouplist: user [%s]\n", user)); >+ >+- /* Save the winbindd state and not just blindly turn it back on */ >+- >+- winbindd_env = getenv(WINBINDD_DONT_ENV); >+- >+ /* This is only ever called for Unix users, remote memberships are >+ * always determined by the info3 coming back from auth3 or the >+ * PAC. */ >+- >+- winbind_off() ; >++ winbind_env = winbind_env_set(); >++ winbind_off(); >+ >+ #ifdef HAVE_GETGROUPLIST >+ retval = getgrouplist(user, gid, groups, grpcnt); >+@@ -142,9 +138,8 @@ >+ unbecome_root(); >+ #endif >+ >+- /* allow winbindd lookups , but only if they were not already disabled */ >+- >+- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >++ /* allow winbindd lookups, but only if they were not already disabled */ >++ if (!winbind_env) { >+ winbind_on(); >+ } >+ >Index: files/patch-zb >=================================================================== >RCS file: files/patch-zb >diff -N files/patch-zb >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-zb 9 Oct 2006 00:00:57 -0000 >@@ -0,0 +1,26 @@ >+--- param/loadparm.c.orig Fri Aug 25 13:40:09 2006 >++++ param/loadparm.c Fri Aug 25 13:46:28 2006 >+@@ -3852,7 +3852,7 @@ >+ >+ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal) >+ { >+- service * pService = ServicePtrs[snum]; >++ service * pService = NULL; >+ int i; >+ BOOL result = False; >+ parm_class p_class; >+@@ -3883,8 +3883,13 @@ >+ if (isGlobal) { >+ p_class = P_GLOBAL; >+ flag = FLAG_GLOBAL; >+- } else >++ } else { >++ if (!VALID_SNUM(snum)) { >++ return False; >++ } >++ pService = ServicePtrs[snum]; >+ p_class = P_LOCAL; >++ } >+ >+ for (i = 0; parm_table[i].label; i++) { >+ if (strwicmp(parm_table[i].label, parm_name) == 0 && >Index: files/samba.in >=================================================================== >RCS file: /home/ncvs/ports/net/samba3/files/samba.in,v >retrieving revision 1.3 >diff -u -r1.3 samba.in >--- files/samba.in 19 Sep 2006 01:39:21 -0000 1.3 >+++ files/samba.in 9 Oct 2006 00:32:05 -0000 >@@ -51,8 +51,8 @@ > samba_parm="${testparm_command} -s -v --parameter-name" > %%WINBIND%%samba_idmap=$(${samba_parm} 'idmap uid' ${samba_config} 2>/dev/null) > samba_lockdir=$(${samba_parm} 'lock directory' ${samba_config} 2>/dev/null) >-# Setup slave variables >-if [ -n "${samba_enable}" ] && checkyesno samba_enable; then >+# Setup dependent variables >+if [ -n "${rcvar}" ] && checkyesno ${rcvar}; then > nmbd_enable=${nmbd_enable="YES"} > smbd_enable=${smbd_enable="YES"} > %%WINBIND%% # Check that winbindd is actually configured >@@ -60,7 +60,9 @@ > %%WINBIND%% winbindd_enable=${winbindd_enable="YES"} > %%WINBIND%% fi > fi >-# Defaults for slave variables >+# Hack to enable check of dependent variables >+eval real_${rcvar}=\${${rcvar}:="NO"} ${rcvar}="YES" >+# Defaults for dependent variables > nmbd_enable=${nmbd_enable:="NO"} > nmbd_flags=${nmbd_flags="-D"} > smbd_enable=${smbd_enable:="NO"} >@@ -102,13 +104,14 @@ > # Check master variable > echo "# ${name}" > if [ -n "${rcvar}" ]; then >- if checkyesno ${rcvar}; then >+ # Use original configured value >+ if checkyesno "real_${rcvar}"; then > echo "\$${rcvar}=YES" > else > echo "\$${rcvar}=NO" > fi > fi >- # Check slave variables >+ # Check dependent variables > samba_cmd "${_rc_prefix}${rc_arg}" ${rc_extra_args} > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 104200
: 71556