samba-cn (3.2.5-1) stable; urgency=low
* prva verzija za lenny
+ * ovisnost o verzijama paketa u lennyju
-- Ivan Rako <Ivan.Rako@CARNet.hr> Mon, 18 May 2009 15:04:10 +0200
Package: samba-cn
Architecture: all
-Depends: samba, smbclient
+Depends: samba (>= 2:3.2.5), smbclient (>= 2:3.2.5)
Description: a LanManager-like file and printer server for Unix
The Samba software suite is a collection of programs that
implements the SMB/CIFS protocol for unix systems, allowing you to serve
# Load CARNet Tools
. /usr/share/carnet-tools/functions.sh
-cp_check_and_sed '; security = user' \
- 's/; security = user/ security = user/g' \
+cp_check_and_sed '#[[:space:]]*security = user' \
+ 's/#[[:space:]]*security = user/ security = user/g' \
/etc/samba/smb.conf || true
+cp_check_and_sed ';[[:space:]]*security = user' \
+ 's/;[[:space:]]*security = user/ security = user/g' \
+ /etc/samba/smb.conf || true
+
+cp_get_netaddr || true
+net="$RET"
+if ! grep -q '^[[:space:]]*hosts allow' /etc/samba/smb.conf; then
+ echo " hosts allow = $net 127.0.0.1" >> /etc/samba/smb.conf
+fi
+if ! grep -q '^[[:space:]]*hosts deny' /etc/samba/smb.conf; then
+ echo " hosts deny = ALL" >> /etc/samba/smb.conf
+fi
+
# restart
if [ -x /usr/sbin/invoke-rc.d ]; then
[ -x /etc/init.d/samba ] && invoke-rc.d samba restart