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

« back to all changes in this revision

Viewing changes to source/lib/netapi/examples/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-03-03 22:02:23 UTC
  • mfrom: (0.28.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090303220223-3bdlm2d9fwx1p1ye
Tags: 2:3.3.1-1ubuntu1
* Merge from Debian unstable (LP: #337094), 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/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.
  + debian/rules:
    - enable "native" PIE hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
* Dropped changes, merged in Debian:
  + debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
    debian/libpam-smbpass.prerm, debian/libpam-smbpass.files,
    debian/rules:
    - Make libpam-smbpasswd depend on libpam-runtime to allow 
      libpam-smbpasswd for auto-configuration.
  + debian/control:
    - Provide a config block for the new PAM framework to auto-configure
      itself
  + debian/samba.postinst:
    - When populating the new sambashare group, it is not an error
      if the user simply does not exist; test for this case and let
      the install continue instead of aborting.
  + debian/winbind.files:
    - include additional files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
GTK_FLAGS=`pkg-config gtk+-2.0 --cflags`
2
 
GTK_LIBS=`pkg-config gtk+-2.0 --libs`
3
 
 
4
 
KRB5LIBS=-Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
5
 
LDAP_LIBS=-lldap -llber 
6
 
LIBS=-lcrypt -lresolv -lnsl -ldl -lnetapi -ltdb -ltalloc
7
 
DEVELOPER_CFLAGS=-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER -Wdeclaration-after-statement -Werror-implicit-function-declaration
8
 
FLAGS=-I../ -L../../../bin  -O -D_SAMBA_BUILD_=3 $(GTK_FLAGS)
9
 
CC=gcc
10
 
PICFLAG=-fPIC
11
 
LDFLAGS=-pie -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -L./bin -L/usr/lib32
12
 
DYNEXP=-Wl,--export-dynamic
13
 
NETAPI_LIBS=$(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
14
 
CMDLINE_LIBS=$(NETAPI_LIBS) -lpopt
15
 
 
16
 
# Compile a source file.
17
 
COMPILE_CC = $(CC) -I. $(FLAGS) $(PICFLAG) -c $< -o $@
18
 
COMPILE = $(COMPILE_CC)
19
 
 
20
 
PROGS = bin/getdc \
21
 
        bin/dsgetdc \
22
 
        bin/netdomjoin \
23
 
        bin/netdomjoin-gui \
24
 
        bin/getjoinableous \
25
 
        bin/user_add \
26
 
        bin/user_del \
27
 
        bin/user_enum \
28
 
        bin/user_dispinfo
29
 
 
30
 
all: $(PROGS)
31
 
 
32
 
MAKEDIR = || exec false; \
33
 
          if test -d "$$dir"; then :; else \
34
 
          echo mkdir "$$dir"; \
35
 
          mkdir -p "$$dir" >/dev/null 2>&1 || \
36
 
          test -d "$$dir" || \
37
 
          mkdir "$$dir" || \
38
 
          exec false; fi || exec false
39
 
 
40
 
BINARY_PREREQS = bin/.dummy
41
 
 
42
 
bin/.dummy:
43
 
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
44
 
          dir=bin $(MAKEDIR); fi
45
 
        @: >> $@ || : > $@ # what a fancy emoticon!
46
 
 
47
 
.c.o:
48
 
        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
49
 
         dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
50
 
        @echo Compiling $*.c
51
 
        @$(COMPILE) && exit 0;\
52
 
                echo "The following command failed:" 1>&2;\
53
 
                echo "$(COMPILE_CC)" 1>&2;\
54
 
                $(COMPILE_CC) >/dev/null 2>&1
55
 
 
56
 
CMDLINE_OBJ = common.o
57
 
GETDC_OBJ = getdc/getdc.o $(CMDLINE_OBJ)
58
 
DSGETDC_OBJ = dsgetdc/dsgetdc.o $(CMDLINE_OBJ)
59
 
NETDOMJOIN_OBJ = netdomjoin/netdomjoin.o $(CMDLINE_OBJ)
60
 
NETDOMJOIN_GUI_OBJ = netdomjoin-gui/netdomjoin-gui.o
61
 
GETJOINABLEOUS_OBJ = getjoinableous/getjoinableous.o $(CMDLINE_OBJ)
62
 
USERADD_OBJ = user/user_add.o $(CMDLINE_OBJ)
63
 
USERDEL_OBJ = user/user_del.o $(CMDLINE_OBJ)
64
 
USERENUM_OBJ = user/user_enum.o $(CMDLINE_OBJ)
65
 
USERDISPINFO_OBJ = user/user_dispinfo.o $(CMDLINE_OBJ)
66
 
 
67
 
bin/getdc: $(BINARY_PREREQS) $(GETDC_OBJ)
68
 
        @echo Linking $@
69
 
        @$(CC) $(FLAGS) -o $@ $(GETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
70
 
 
71
 
bin/dsgetdc: $(BINARY_PREREQS) $(DSGETDC_OBJ)
72
 
        @echo Linking $@
73
 
        @$(CC) $(FLAGS) -o $@ $(DSGETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
74
 
 
75
 
bin/getjoinableous: $(BINARY_PREREQS) $(GETJOINABLEOUS_OBJ)
76
 
        @echo Linking $@
77
 
        @$(CC) $(FLAGS) -o $@ $(GETJOINABLEOUS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
78
 
 
79
 
bin/netdomjoin: $(BINARY_PREREQS) $(NETDOMJOIN_OBJ)
80
 
        @echo Linking $@
81
 
        @$(CC) $(FLAGS) -o $@ $(NETDOMJOIN_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
82
 
 
83
 
bin/netdomjoin-gui: $(BINARY_PREREQS) $(NETDOMJOIN_GUI_OBJ)
84
 
        @echo Linking $@
85
 
        @$(CC) $(FLAGS) $(GTK_FLAGS) -o $@ $(NETDOMJOIN_GUI_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(GTK_LIBS)
86
 
 
87
 
bin/user_add: $(BINARY_PREREQS) $(USERADD_OBJ)
88
 
        @echo Linking $@
89
 
        @$(CC) $(FLAGS) -o $@ $(USERADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
90
 
 
91
 
bin/user_del: $(BINARY_PREREQS) $(USERDEL_OBJ)
92
 
        @echo Linking $@
93
 
        @$(CC) $(FLAGS) -o $@ $(USERDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
94
 
 
95
 
bin/user_enum: $(BINARY_PREREQS) $(USERENUM_OBJ)
96
 
        @echo Linking $@
97
 
        @$(CC) $(FLAGS) -o $@ $(USERENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
98
 
 
99
 
bin/user_dispinfo: $(BINARY_PREREQS) $(USERDISPINFO_OBJ)
100
 
        @echo Linking $@
101
 
        @$(CC) $(FLAGS) -o $@ $(USERDISPINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
102
 
 
103
 
clean:
104
 
        -rm -f $(PROGS)
105
 
        -rm -f core */*~ *~ \
106
 
                */*.o */*/*.o */*/*/*.o