~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to debian/patches/shrink-dead-code.patch

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2009-05-18 13:26:04 UTC
  • mfrom: (0.28.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090518132604-ebyuqimgymtr3h0k
Tags: 2:3.3.4-2ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted (LP: #312449)
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
    - Add suggests keyutils for smbfs. (LP: #300221)
  + debian/rules:
    - enable "native" PIE hardening.
    - remove --with-ctdb and --with-cluster-support=yes
  + Add ufw integration:
    - Created debian/samba.ufw profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install 
      profile
    - debian/control: have samba sugguest ufw.
* Dropped patches:
  + debian/patches/fix-upstream-bug-6186.patch: Merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: samba-3.3.1/source/Makefile.in
 
1
Comment by Michael Adam <obnox@samba.org>:
 
2
 
 
3
While this patch is clever in one respect, it has bad side effects:
 
4
Functions that not used are removed from the binaries.
 
5
For functions that are only used in shared objects, this is very bad,
 
6
since these will refuse to work (load).
 
7
 
 
8
Example: librpc/gen_ndr/ndr_xattr.c:ndr_pull_xattr_NTACL() is only
 
9
used in the acl_tdb and acl_xattr vfs modules.
 
10
So the symbol is not present in smbd, and thus these modules will
 
11
not work. The _do_ not work in the 3.3. packages that are out there.
 
12
 
 
13
I recommend not using this patch!
 
14
 
 
15
Better reduction is done by fixing the linking dependencies... :-(
 
16
 
 
17
Michael
 
18
 
 
19
Index: samba-3.3.4/source/Makefile.in
2
20
===================================================================
3
 
--- samba-3.3.1.orig/source/Makefile.in
4
 
+++ samba-3.3.1/source/Makefile.in
5
 
@@ -1323,37 +1323,47 @@
6
 
 
7
 
 bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@ @BUILD_POPT@
8
 
        @echo Linking $@
9
 
-       @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
10
 
+       @$(AR) -rc $@.a $(SMBD_OBJ)
11
 
+       @$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(LDAP_LIBS) \
12
 
                $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
13
 
                $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
14
 
                $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
15
 
                $(WINBIND_LIBS)
16
 
+       @rm -f $@.a
 
21
--- samba-3.3.4.orig/source/Makefile.in 2009-05-02 14:33:23.654935629 +0200
 
22
+++ samba-3.3.4/source/Makefile.in      2009-05-02 14:34:41.393926942 +0200
 
23
@@ -1336,182 +1336,243 @@
17
24
 
18
25
 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
19
26
        @echo Linking $@
55
62
 
56
63
 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@
57
64
        @echo Linking $@
58
 
@@ -1364,226 +1374,303 @@
 
65
-       @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
 
66
+       @$(AR) -rc $@.a $(NET_OBJ)
 
67
+       @$(CC) $(FLAGS) -o $@ $@.a $(DYNEXP) $(LDFLAGS) $(LIBS) \
 
68
                $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
 
69
                $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
 
70
                @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS)
 
71
+       @rm -f $@.a
59
72
 
60
73
 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
61
74
        @echo Linking $@
283
296
 
284
297
 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
285
298
        @echo Linking $@
286
 
-       @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
287
 
+       @$(AR) -rc $@.a $(VFSTEST_OBJ)
288
 
+       @$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(TERMLDFLAGS) \
289
 
                $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \
290
 
                $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
291
 
                @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
292
 
                $(WINBIND_LIBS)
293
 
+       @rm -f $@.a
 
299
@@ -1523,72 +1584,96 @@
294
300
 
295
301
 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
296
302
        @echo Linking $@
399
405
 
400
406
 
401
407
 #####################################################################
402
 
@@ -2176,16 +2263,20 @@
403
 
 
404
 
 bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
405
 
        @echo "Linking $@"
406
 
-       @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
407
 
+       @$(AR) -rc $@.a $(WINBINDD_OBJ)
408
 
+       @$(CC) $(FLAGS) -o $@ $@.a $(LDFLAGS) $(DYNEXP) $(LIBS) \
409
 
                $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
410
 
                $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
411
 
+       @rm -f $@.a
 
408
@@ -2187,10 +2272,12 @@
412
409
 
413
410
 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
414
411
        @echo "Linking $@"
422
419
 
423
420
 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
424
421
        @echo "Linking $@"
425
 
@@ -2464,9 +2555,11 @@
 
422
@@ -2477,9 +2564,11 @@
426
423
 
427
424
 bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
428
425
        @echo Linking $@
435
432
 
436
433
 bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
437
434
        $(LIB_NONSMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_SHARED@
438
 
@@ -2484,23 +2577,31 @@
 
435
@@ -2497,23 +2586,31 @@
439
436
 
440
437
 bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@
441
438
        @echo Linking $@