Print this page
293 useradd/del/mod should be ZFS-aware


  33 GREP=           grep
  34 
  35 USERADD=        useradd
  36 USERDEL=        userdel
  37 USERMOD=        usermod
  38 ROLEADD=        roleadd
  39 ROLEDEL=        roledel
  40 ROLEMOD=        rolemod
  41 
  42 SBINPROG=       $(USERADD)   $(USERDEL)   $(USERMOD)
  43 #
  44 #       Removing sysadm: deleted $(SYSADMPROG) from this target.
  45 #
  46 PROG=           $(SBINPROG)
  47 PRODUCT=        $(PROG)
  48 
  49 ADD_OBJ=        useradd.o     homedir.o        groups.o     call_pass.o \
  50                 userdefs.o    messages.o       val_lgrp.o   funcs.o \
  51                 val_lprj.o    proj.o
  52 
  53 DEL_OBJ=        userdel.o     call_pass.o      rmfiles.o    isbusy.o \
  54                 groups.o      messages.o       funcs.o      proj.o
  55 
  56 MOD_OBJ=        usermod.o     movedir.o        groups.o     rmfiles.o \
  57                 call_pass.o   isbusy.o         homedir.o    userdefs.o \
  58                 messages.o    val_lgrp.o       funcs.o      val_lprj.o \
  59                 proj.o
  60 
  61 OBJECTS=        $(ADD_OBJ)     $(DEL_OBJ)    $(MOD_OBJ)
  62 
  63 SRCS=           $(OBJECTS:.o=.c)
  64 
  65 LIBDIR=         ../lib
  66 LIBUSRGRP=      $(LIBDIR)/lib.a
  67 LIBADM=         -ladm
  68 LOCAL=          ../inc
  69 HERE=           .
  70 LINTFLAGS=      -u
  71 
  72 ROOTSKEL=       $(ROOTETC)/skel
  73 INSSBINPROG=    $(SBINPROG:%=$(ROOTUSRSBIN)/%)
  74 INSSKELFILE=    $(SKELFILE:%=$(ROOTSKEL)/%)
  75 
  76 CPPFLAGS=       -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
  77 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  78 
  79 $(INSSBINPROG)  := FILEMODE = 0555
  80 $(INSSYSADMPROG):= FILEMODE = 0500
  81 $(INSSKELFILE)  := FILEMODE = 0644
  82 
  83 $(USERADD) :=   OBJS = $(ADD_OBJ)
  84 $(USERADD) :=   LIBS = $(LIBUSRGRP)
  85 $(USERADD) :=   LDLIBS += -lcmdutils
  86 
  87 $(USERDEL) :=   OBJS = $(DEL_OBJ)
  88 $(USERDEL) :=   LIBS = $(LIBUSRGRP)
  89 
  90 $(USERMOD) :=   OBJS = $(MOD_OBJ)
  91 $(USERMOD) :=   LIBS = $(LIBUSRGRP)
  92 
  93 LDLIBS +=       -lbsm -lnsl -lsecdb -lproject -ltsol
  94 
  95 .PARALLEL: $(OBJECTS)
  96 
  97 all:            $(PRODUCT)
  98 
  99 $(PROG):        $$(OBJS) $$(LIBS)
 100         $(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
 101         $(POST_PROCESS)
 102 
 103 $(USERADD):     $(ADD_OBJ)
 104 $(USERMOD):     $(MOD_OBJ)
 105 $(USERDEL):     $(DEL_OBJ)
 106 
 107 install:        all $(ROOTETCDEFAULTFILES) .WAIT \
 108                         $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
 109                 $(RM) $(ROOTUSRSBIN)/$(ROLEADD)
 110                 $(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
 111                 $(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
 112                 $(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
 113                 $(RM) $(ROOTUSRSBIN)/$(ROLEMOD)


  33 GREP=           grep
  34 
  35 USERADD=        useradd
  36 USERDEL=        userdel
  37 USERMOD=        usermod
  38 ROLEADD=        roleadd
  39 ROLEDEL=        roledel
  40 ROLEMOD=        rolemod
  41 
  42 SBINPROG=       $(USERADD)   $(USERDEL)   $(USERMOD)
  43 #
  44 #       Removing sysadm: deleted $(SYSADMPROG) from this target.
  45 #
  46 PROG=           $(SBINPROG)
  47 PRODUCT=        $(PROG)
  48 
  49 ADD_OBJ=        useradd.o     homedir.o        groups.o     call_pass.o \
  50                 userdefs.o    messages.o       val_lgrp.o   funcs.o \
  51                 val_lprj.o    proj.o
  52 
  53 DEL_OBJ=        userdel.o     call_pass.o      homedir.o    isbusy.o \
  54                 groups.o      messages.o       funcs.o      proj.o
  55 
  56 MOD_OBJ=        usermod.o     movedir.o        groups.o     homedir.o \
  57                 call_pass.o   isbusy.o         userdefs.o \
  58                 messages.o    val_lgrp.o       funcs.o      val_lprj.o \
  59                 proj.o
  60 
  61 OBJECTS=        $(ADD_OBJ)     $(DEL_OBJ)    $(MOD_OBJ)
  62 
  63 SRCS=           $(OBJECTS:.o=.c)
  64 
  65 LIBDIR=         ../lib
  66 LIBUSRGRP=      $(LIBDIR)/lib.a
  67 LIBADM=         -ladm
  68 LOCAL=          ../inc
  69 HERE=           .
  70 LINTFLAGS=      -u
  71 
  72 ROOTSKEL=       $(ROOTETC)/skel
  73 INSSBINPROG=    $(SBINPROG:%=$(ROOTUSRSBIN)/%)
  74 INSSKELFILE=    $(SKELFILE:%=$(ROOTSKEL)/%)
  75 
  76 CPPFLAGS=       -I$(HERE) -I$(LOCAL) $(CPPFLAGS.master)
  77 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  78 
  79 $(INSSBINPROG)  := FILEMODE = 0555
  80 $(INSSYSADMPROG):= FILEMODE = 0500
  81 $(INSSKELFILE)  := FILEMODE = 0644
  82 
  83 $(USERADD) :=   OBJS = $(ADD_OBJ)
  84 $(USERADD) :=   LIBS = $(LIBUSRGRP)
  85 $(USERADD) :=   LDLIBS += -lcmdutils
  86 
  87 $(USERDEL) :=   OBJS = $(DEL_OBJ)
  88 $(USERDEL) :=   LIBS = $(LIBUSRGRP)
  89 
  90 $(USERMOD) :=   OBJS = $(MOD_OBJ)
  91 $(USERMOD) :=   LIBS = $(LIBUSRGRP)
  92 
  93 LDLIBS +=       -lbsm -lnsl -lsecdb -lproject -lzfs -ltsol
  94 
  95 .PARALLEL: $(OBJECTS)
  96 
  97 all:            $(PRODUCT)
  98 
  99 $(PROG):        $$(OBJS) $$(LIBS)
 100         $(LINK.c) $(OBJS) -o $@ $(LIBS) $(LDLIBS)
 101         $(POST_PROCESS)
 102 
 103 $(USERADD):     $(ADD_OBJ)
 104 $(USERMOD):     $(MOD_OBJ)
 105 $(USERDEL):     $(DEL_OBJ)
 106 
 107 install:        all $(ROOTETCDEFAULTFILES) .WAIT \
 108                         $(ROOTSKEL) $(INSSBINPROG) $(INSSKELFILE)
 109                 $(RM) $(ROOTUSRSBIN)/$(ROLEADD)
 110                 $(LN) $(ROOTUSRSBIN)/$(USERADD) $(ROOTUSRSBIN)/$(ROLEADD)
 111                 $(RM) $(ROOTUSRSBIN)/$(ROLEDEL)
 112                 $(LN) $(ROOTUSRSBIN)/$(USERDEL) $(ROOTUSRSBIN)/$(ROLEDEL)
 113                 $(RM) $(ROOTUSRSBIN)/$(ROLEMOD)