diff options
author | Renato Botelho <garga@FreeBSD.org> | 2006-09-04 19:00:17 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2006-09-04 19:00:17 +0000 |
commit | a8c167b56575671955e0e9bfeea126fd48071b18 (patch) | |
tree | 5119aab6b35b7f444007f60bb37ef161dfa55bba /net/samba3/files | |
parent | 7fe0166ff539efdb7e05bf99c329623dc6b9cdc6 (diff) |
Notes
Diffstat (limited to 'net/samba3/files')
-rw-r--r-- | net/samba3/files/patch-configure.in | 12 | ||||
-rw-r--r-- | net/samba3/files/patch-nsswitch_pam_winbind.c | 8 | ||||
-rw-r--r-- | net/samba3/files/patch-pam_smbpass | 42 | ||||
-rw-r--r-- | net/samba3/files/patch-pam_smbpass_pam_smb_auth.c | 11 | ||||
-rw-r--r-- | net/samba3/files/patch-pam_smbpass_pam_smb_passwd.c | 11 | ||||
-rw-r--r-- | net/samba3/files/patch-pam_smbpass_support.c | 20 | ||||
-rw-r--r-- | net/samba3/files/patch-utils_net_time.c | 10 | ||||
-rw-r--r-- | net/samba3/files/pkg-deinstall.in | 34 | ||||
-rw-r--r-- | net/samba3/files/pkg-install.in | 29 | ||||
-rw-r--r-- | net/samba3/files/pkg-message.in | 11 | ||||
-rw-r--r-- | net/samba3/files/samba.in | 34 | ||||
-rw-r--r-- | net/samba3/files/smb.conf.sample.in | 5 |
12 files changed, 154 insertions, 73 deletions
diff --git a/net/samba3/files/patch-configure.in b/net/samba3/files/patch-configure.in index a91fb732872e..4b31e61be751 100644 --- a/net/samba3/files/patch-configure.in +++ b/net/samba3/files/patch-configure.in @@ -1,5 +1,5 @@ ---- configure.in.orig Fri Jun 23 15:16:53 2006 -+++ configure.in Tue Jun 27 01:17:29 2006 +--- configure.in.orig Fri Jul 21 18:22:57 2006 ++++ configure.in Thu Aug 24 01:30:57 2006 @@ -242,7 +242,6 @@ AC_SUBST(SHELL) AC_SUBST(LDSHFLAGS) @@ -54,7 +54,7 @@ if test "${ac_cv_prog_gnu_ld}" = "yes"; then DYNEXP="-Wl,-E" fi -@@ -4868,6 +4879,7 @@ +@@ -4882,6 +4893,7 @@ AC_MSG_RESULT(yes) case "$host_os" in *) @@ -62,7 +62,7 @@ AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"]) AC_CHECK_LIB(aio,aio_read,[AIO_LIBS="$LIBS -laio"]) AC_CACHE_CHECK([for asynchronous io support],samba_cv_HAVE_AIO,[ -@@ -5268,14 +5280,17 @@ +@@ -5282,14 +5294,17 @@ WINBIND_NSS="nsswitch/libnss_winbind.$SHLIBEXT" WINBIND_WINS_NSS="nsswitch/libnss_wins.$SHLIBEXT" WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS @@ -80,7 +80,7 @@ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \ nsswitch/winbind_nss_linux.o" WINBIND_NSS="nsswitch/nss_winbind.$SHLIBEXT" -@@ -5290,6 +5305,7 @@ +@@ -5304,6 +5319,7 @@ *solaris*) # Solaris winbind client is implemented as a wrapper around # the Linux version. @@ -88,7 +88,7 @@ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \ nsswitch/winbind_nss_linux.o" WINBIND_NSS_EXTRA_LIBS="-lsocket" -@@ -5316,6 +5332,7 @@ +@@ -5330,6 +5346,7 @@ AC_SUBST(WINBIND_NSS_LDSHFLAGS) AC_SUBST(WINBIND_NSS_EXTRA_OBJS) AC_SUBST(WINBIND_NSS_EXTRA_LIBS) diff --git a/net/samba3/files/patch-nsswitch_pam_winbind.c b/net/samba3/files/patch-nsswitch_pam_winbind.c index 039643a83d1d..1e0c90546733 100644 --- a/net/samba3/files/patch-nsswitch_pam_winbind.c +++ b/net/samba3/files/patch-nsswitch_pam_winbind.c @@ -1,6 +1,6 @@ ---- nsswitch/pam_winbind.c.orig Sun May 28 02:21:10 2006 -+++ nsswitch/pam_winbind.c Sun May 28 02:22:16 2006 -@@ -997,7 +997,7 @@ +--- nsswitch/pam_winbind.c.orig Mon Aug 7 18:46:33 2006 ++++ nsswitch/pam_winbind.c Thu Aug 24 01:30:57 2006 +@@ -1016,7 +1016,7 @@ } return PAM_USER_UNKNOWN; case 0: @@ -9,7 +9,7 @@ if (tmp != NULL) { retval = atoi(tmp); switch (retval) { -@@ -1300,7 +1300,7 @@ +@@ -1319,7 +1319,7 @@ * By reaching here we have approved the passwords and must now * rebuild the password database file. */ diff --git a/net/samba3/files/patch-pam_smbpass b/net/samba3/files/patch-pam_smbpass deleted file mode 100644 index a4946fc4833e..000000000000 --- a/net/samba3/files/patch-pam_smbpass +++ /dev/null @@ -1,42 +0,0 @@ ---- pam_smbpass/pam_smb_auth.c.orig Thu Apr 20 04:29:22 2006 -+++ pam_smbpass/pam_smb_auth.c Sat May 27 01:57:31 2006 -@@ -164,7 +164,7 @@ - - retval = PAM_SUCCESS; - -- pam_get_data(pamh, "smb_setcred_return", (const void **) &pretval); -+ pam_get_data(pamh, "smb_setcred_return", (void **) &pretval); - if(pretval) { - retval = *pretval; - SAFE_FREE(pretval); ---- pam_smbpass/pam_smb_passwd.c.orig Thu Apr 20 04:29:22 2006 -+++ pam_smbpass/pam_smb_passwd.c Sat May 27 01:57:31 2006 -@@ -226,7 +226,7 @@ - (const void **)&pass_old ); - } else { - retval = pam_get_data( pamh, _SMB_OLD_AUTHTOK, -- (const void **)&pass_old ); -+ (void **)&pass_old ); - if (retval == PAM_NO_MODULE_DATA) { - pass_old = NULL; - retval = PAM_SUCCESS; ---- pam_smbpass/support.c.orig Sun May 28 02:23:20 2006 -+++ pam_smbpass/support.c Sun May 28 02:24:07 2006 -@@ -384,7 +384,7 @@ - if (newauth != NULL) { - - /* any previous failures for this user ? */ -- pam_get_data(pamh, data_name, (const void **) &old); -+ pam_get_data(pamh, data_name, (void **) &old); - - if (old != NULL) { - newauth->count = old->count + 1; -@@ -594,7 +594,7 @@ - - retval = pam_set_data( pamh, data_name, (void *) token, _cleanup ); - if (retval != PAM_SUCCESS -- || (retval = pam_get_data( pamh, data_name, (const void **)&item )) -+ || (retval = pam_get_data( pamh, data_name, (void **)&item )) - != PAM_SUCCESS) - { - _log_err( LOG_CRIT, "error manipulating password data [%s]" diff --git a/net/samba3/files/patch-pam_smbpass_pam_smb_auth.c b/net/samba3/files/patch-pam_smbpass_pam_smb_auth.c new file mode 100644 index 000000000000..502afeb2175d --- /dev/null +++ b/net/samba3/files/patch-pam_smbpass_pam_smb_auth.c @@ -0,0 +1,11 @@ +--- pam_smbpass/pam_smb_auth.c.orig Fri Jun 23 15:16:50 2006 ++++ pam_smbpass/pam_smb_auth.c Thu Aug 24 01:30:57 2006 +@@ -167,7 +167,7 @@ + + retval = PAM_SUCCESS; + +- pam_get_data(pamh, "smb_setcred_return", (const void **) &pretval); ++ pam_get_data(pamh, "smb_setcred_return", (void **) &pretval); + if(pretval) { + retval = *pretval; + SAFE_FREE(pretval); diff --git a/net/samba3/files/patch-pam_smbpass_pam_smb_passwd.c b/net/samba3/files/patch-pam_smbpass_pam_smb_passwd.c new file mode 100644 index 000000000000..f8d20936f884 --- /dev/null +++ b/net/samba3/files/patch-pam_smbpass_pam_smb_passwd.c @@ -0,0 +1,11 @@ +--- pam_smbpass/pam_smb_passwd.c.orig Thu Apr 20 04:29:22 2006 ++++ pam_smbpass/pam_smb_passwd.c Thu Aug 24 01:30:57 2006 +@@ -226,7 +226,7 @@ + (const void **)&pass_old ); + } else { + retval = pam_get_data( pamh, _SMB_OLD_AUTHTOK, +- (const void **)&pass_old ); ++ (void **)&pass_old ); + if (retval == PAM_NO_MODULE_DATA) { + pass_old = NULL; + retval = PAM_SUCCESS; diff --git a/net/samba3/files/patch-pam_smbpass_support.c b/net/samba3/files/patch-pam_smbpass_support.c new file mode 100644 index 000000000000..0c94db5550bb --- /dev/null +++ b/net/samba3/files/patch-pam_smbpass_support.c @@ -0,0 +1,20 @@ +--- pam_smbpass/support.c.orig Tue May 23 20:54:32 2006 ++++ pam_smbpass/support.c Thu Aug 24 01:30:57 2006 +@@ -384,7 +384,7 @@ + if (newauth != NULL) { + + /* any previous failures for this user ? */ +- pam_get_data(pamh, data_name, (const void **) &old); ++ pam_get_data(pamh, data_name, (void **) &old); + + if (old != NULL) { + newauth->count = old->count + 1; +@@ -594,7 +594,7 @@ + + retval = pam_set_data( pamh, data_name, (void *) token, _cleanup ); + if (retval != PAM_SUCCESS +- || (retval = pam_get_data( pamh, data_name, (const void **)&item )) ++ || (retval = pam_get_data( pamh, data_name, (void **)&item )) + != PAM_SUCCESS) + { + _log_err( LOG_CRIT, "error manipulating password data [%s]" diff --git a/net/samba3/files/patch-utils_net_time.c b/net/samba3/files/patch-utils_net_time.c index 7248d85066dc..9af23abe7230 100644 --- a/net/samba3/files/patch-utils_net_time.c +++ b/net/samba3/files/patch-utils_net_time.c @@ -1,8 +1,8 @@ ---- utils/net_time.c.orig Fri Feb 25 18:59:42 2005 -+++ utils/net_time.c Sun Mar 20 01:41:20 2005 -@@ -76,9 +76,16 @@ - - tm = localtime(&t); +--- utils/net_time.c.orig Fri Jun 23 15:16:53 2006 ++++ utils/net_time.c Thu Aug 24 01:30:57 2006 +@@ -79,9 +79,16 @@ + return "unknown"; + } +#if defined(FREEBSD) + fstr_sprintf(s, "%02d%02d%02d%02d%02d.%02d", diff --git a/net/samba3/files/pkg-deinstall.in b/net/samba3/files/pkg-deinstall.in new file mode 100644 index 000000000000..e6f906d7522e --- /dev/null +++ b/net/samba3/files/pkg-deinstall.in @@ -0,0 +1,34 @@ +#! /bin/sh + +PATH=/bin:/usr/sbin:/usr/bin:/usr/sbin + +SAMBA_SPOOL="%%SAMBA_SPOOL%%" +SAMBA_LOGDIR="%%SAMBA_LOGDIR%%" +SAMBA_LOCKDIR="%%SAMBA_LOCKDIR%%" +SAMBA_PRIVATEDIR="%%SAMBA_PRIVATEDIR%%" +SAMBA_OWNER=root +SAMBA_GROUP=wheel + +post-deinstall() { + rm -rf ${SAMBA_SPOOL} + rmdir ${SAMBA_LOGDIR} 2>/dev/null || true + for f in connections.tdb locking.tdb messages.tdb sessionid.tdb \ + unexpected.tdb brlock.tdb namelist.debug + do + rm -f "${SAMBA_LOCKDIR}/${f}" + done + rmdir ${SAMBA_LOCKDIR} 2>/dev/null || true + rmdir ${SAMBA_PRIVATEDIR} 2>/dev/null || true + echo "WARNING: If you will *NOT* use this package anymore, please remove the" + echo " following directories manually:" + echo " ${SAMBA_PRIVATEDIR}" + echo " ${SAMBA_LOGDIR}" + echo " ${SAMBA_LOCKDIR}" + echo +} + +case $2 in + POST-DEINSTALL) + post-deinstall + ;; +esac diff --git a/net/samba3/files/pkg-install.in b/net/samba3/files/pkg-install.in new file mode 100644 index 000000000000..e9d303368189 --- /dev/null +++ b/net/samba3/files/pkg-install.in @@ -0,0 +1,29 @@ +#! /bin/sh + +PATH=/bin:/usr/sbin:/usr/bin:/usr/sbin + +SAMBA_SPOOL="%%SAMBA_SPOOL%%" +SAMBA_LOGDIR="%%SAMBA_LOGDIR%%" +SAMBA_LOCKDIR="%%SAMBA_LOCKDIR%%" +SAMBA_PRIVATEDIR="%%SAMBA_PRIVATEDIR%%" +SAMBA_OWNER=root +SAMBA_GROUP=wheel + +post-install() { + mkdir -p ${SAMBA_SPOOL} && chmod 1777 ${SAMBA_SPOOL} + mkdir -p ${SAMBA_LOGDIR} && chmod 0755 ${SAMBA_LOGDIR} + mkdir -p ${SAMBA_LOCKDIR} && chmod 0755 ${SAMBA_LOCKDIR} + mkdir -p ${SAMBA_PRIVATEDIR} && chmod 0700 ${SAMBA_PRIVATEDIR} + if [ $(id -u) -eq 0 ]; then + chown ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_SPOOL} + chown ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_LOGDIR} + chown ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_LOCKDIR} + chown ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_PRIVATEDIR} + fi +} + +case $2 in + POST-INSTALL) + post-install + ;; +esac diff --git a/net/samba3/files/pkg-message.in b/net/samba3/files/pkg-message.in new file mode 100644 index 000000000000..bb6ede87465d --- /dev/null +++ b/net/samba3/files/pkg-message.in @@ -0,0 +1,11 @@ +=============================================================================== +NOTICE: This version of port has changed location of Samba password +NOTICE: (smbpasswd) directory. Files in '%%SAMBA_PRIVATE%%' +NOTICE: have moved to '%%SAMBA_PRIVATEDIR%%'. +=============================================================================== +Samba3 *package* now doesn't include ADS support due the portability problems +with Kerberos5 libraries on different installations. You need to compile port +yourself to get this functionality. + +For additional hints and directions, please, look into the README.FreeBSD file. +=============================================================================== diff --git a/net/samba3/files/samba.in b/net/samba3/files/samba.in index 1f5a1c1a5d01..407dd02019ec 100644 --- a/net/samba3/files/samba.in +++ b/net/samba3/files/samba.in @@ -5,7 +5,8 @@ # PROVIDE: nmbd smbd %%WINBIND%%# PROVIDE: winbindd -# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv %%CUPSD%% +# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv +%%CUPSD%%# REQUIRE: cupsd # BEFORE: LOGIN # KEYWORD: shutdown @@ -26,10 +27,13 @@ name=samba rcvar=`set_rcvar` +samba_enable=${samba_enable="NO"} +testparm_command="%%PREFIX%%/bin/testparm" +samba_parm="${testparm_command} -s -v --parameter-name" load_rc_config $name # Set defaults -samba_config=${samba_config="%%SAMBA_CONFIG%%"} +samba_config=${samba_config="%%SAMBA_CONFDIR%%/%%SAMBA_CONFIG%%"} # Config file is required if [ ! -r ${samba_config} ]; then warn "${samba_config} is not readable." @@ -39,33 +43,38 @@ if [ ! -r ${samba_config} ]; then esac fi -if test -n ${samba_enable=""} && checkyesno samba_enable; then +samba_idmap=`${samba_parm} 'idmap uid' ${samba_config} 2>/dev/null` +samba_lockdir=`${samba_parm} 'lock directory' ${samba_config} 2>/dev/null` + +if test -n ${samba_enable="NO"} && checkyesno samba_enable; then nmbd_enable=${nmbd_enable="YES"} smbd_enable=${smbd_enable="YES"} %%WINBIND%% # Check that winbind is actually configured -%%WINBIND%% if [ "`egrep -i '(idmap.*uid|winbind.*uid)' ${samba_config} 2>/dev/null | egrep -v [\#\;]`" ]; then +%%WINBIND%% if [ -n ${samba_idmap} ]; then %%WINBIND%% winbindd_enable="YES" %%WINBIND%% fi fi nmbd_precmd() { # XXX: Never delete winbindd_idmap, winbindd_cache and group_mapping - if [ -d "%%SAMBA_LOCKDIR%%" ]; then - echo "Starting SAMBA: removing stale tdbs :" + echo -n "Starting Samba " + if [ -d ${samba_lockdir} ]; then + echo -n "- removing stale tdbs: " for file in connections.tdb messages.tdb sessionid.tdb \ unexpected.tdb brlock.tdb locking.tdb namelist.debug do - rm -vf "%%SAMBA_LOCKDIR%%/$file" + rm -vf "${samba_lockdir}/${file}" done fi + echo '.' } # nmbd name=nmbd rcvar=`set_rcvar` command="%%PREFIX%%/sbin/${name}" -required_dirs="%%SAMBA_LOCKDIR%%" -pidfile=%%SAMBA_RUNDIR%%/${name}.pid +required_dirs="${samba_lockdir}" +pidfile="%%SAMBA_RUNDIR%%/${name}.pid" start_precmd="nmbd_precmd" # Defaults nmbd_enable=${nmbd_enable="NO"} @@ -80,7 +89,8 @@ _rc_restart_done=false name=smbd rcvar=`set_rcvar` command="%%PREFIX%%/sbin/${name}" -pidfile=%%SAMBA_RUNDIR%%/${name}.pid +required_dirs="${samba_lockdir}" +pidfile="%%SAMBA_RUNDIR%%/${name}.pid" start_precmd=":" # Defaults smbd_enable=${smbd_enable="NO"} @@ -95,8 +105,8 @@ run_rc_command "$1" %%WINBIND%%name=winbindd %%WINBIND%%rcvar=`set_rcvar` %%WINBIND%%command="%%PREFIX%%/sbin/${name}" -%%WINBIND%%required_dirs="%%SAMBA_LOCKDIR%%" -%%WINBIND%%pidfile=%%SAMBA_RUNDIR%%/${name}.pid +%%WINBIND%%required_dirs="${samba_lockdir}" +%%WINBIND%%pidfile="%%SAMBA_RUNDIR%%/${name}.pid" %%WINBIND%%start_precmd=":" %%WINBIND%%# Defaults %%WINBIND%%winbindd_enable=${winbindd_enable="NO"} diff --git a/net/samba3/files/smb.conf.sample.in b/net/samba3/files/smb.conf.sample.in index d667e88521e2..b55405bd56b4 100644 --- a/net/samba3/files/smb.conf.sample.in +++ b/net/samba3/files/smb.conf.sample.in @@ -95,8 +95,7 @@ # See the chapter 'Samba performance issues' in the Samba HOWTO Collection # and the manual pages for details. # You may want to add the following on a Linux system: -# SO_RCVBUF=8192 SO_SNDBUF=8192 -; socket options = TCP_NODELAY +; socket options = SO_RCVBUF=8192 SO_SNDBUF=8192 # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them @@ -290,5 +289,3 @@ ; writable = yes ; printable = no ; create mask = 0765 - - |