Add ufw integration
authorMathieu Parent <math.parent@gmail.com>
Sun, 3 Apr 2016 05:34:17 +0000 (07:34 +0200)
committerMathieu Parent <math.parent@gmail.com>
Sun, 3 Apr 2016 12:21:30 +0000 (14:21 +0200)
Cherry-picked from Ubuntu:
- Created debian/samba.ufw.profile:
- debian/rules, debian/samba.install: install profile
- debian/control: suggest ufw

debian/control
debian/rules
debian/samba.install
debian/samba.ufw.profile [new file with mode: 0644]

index 2124b0d88595aff05d4eb94c3cc18db623033975..8caf2be03abecf4c8a73b180be12affa82cb381d 100644 (file)
@@ -80,7 +80,8 @@ Suggests: bind9 (>= 1:9.5.1),
           ldb-tools,
           ntp,
           smbldap-tools,
-          winbind
+          winbind,
+          ufw
 Enhances: bind9, ntp
 Breaks: qtsmbstatus-server (<< 2.2.1-3~)
 Replaces: libsamdb0 (<< 4.0.0~alpha17~),
index 51181b8056b0faa61ec1f2384b95639c650f5675..763475a094206d4d2cdf23452d42d9a9b1dfc8db 100755 (executable)
@@ -157,6 +157,8 @@ override_dh_install:
        mkdir -p debian/samba/usr/lib/$(PYSHORT)/dist-packages/samba
        mv $(DESTDIR)/usr/lib/$(PYSHORT)/dist-packages/samba/dckeytab.so \
           debian/samba/usr/lib/$(PYSHORT)/dist-packages/samba/dckeytab.so
+       mkdir -p $(DESTDIR)/etc/ufw/applications.d
+       install -m644 debian/samba.ufw.profile $(DESTDIR)/etc/ufw/applications.d/samba
        # use upstream version of smb.conf.5 if there is no built version
        # this is a temporary workaround for #750593 in xsltproc
        [ -e $(DESTIDR)/usr/share/man/man5/smb.conf.5 ] || \
index f4045a211210562e23f28b287222d504dd2440b5..1fc046dd59264c28342a48fb4c04d5020980e75d 100644 (file)
@@ -1,3 +1,4 @@
+etc/ufw/applications.d/samba
 usr/bin/eventlogadm
 usr/bin/oLschema2ldif
 usr/bin/pdbedit
diff --git a/debian/samba.ufw.profile b/debian/samba.ufw.profile
new file mode 100644 (file)
index 0000000..37bcfe2
--- /dev/null
@@ -0,0 +1,4 @@
+[Samba]
+title=LanManager-like file and printer server for Unix
+description=The Samba software suite is a collection of programs that implements the SMB/CIFS protocol for unix systems, allowing you to serve files and printers to Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred to as the LanManager or NetBIOS protocol.
+ports=137,138/udp|139,445/tcp