]> granicus.if.org Git - fcron/commitdiff
use a specific username and groupname to run under
authorthib <thib>
Sun, 8 Oct 2000 10:09:10 +0000 (10:09 +0000)
committerthib <thib>
Sun, 8 Oct 2000 10:09:10 +0000 (10:09 +0000)
Makefile.in
configure.in

index 8dfbbe87aff00de8465eabc0f1864a2593266f25..80aa7ed3ad7b9cb64978fb9eaf49e2410e1cc899 100644 (file)
@@ -4,7 +4,7 @@
 
 # @configure_input@
 
-# $Id: Makefile.in,v 1.39 2000-09-17 20:08:46 thib Exp $
+# $Id: Makefile.in,v 1.40 2000-10-08 10:09:36 thib Exp $
 
 # The following should not be edited manually (use configure options)
 # If you must do it, BEWARE : some of the following is also defined
@@ -28,7 +28,8 @@ LIBOBJS               = @LIBOBJS@
 DEFS           = @DEFS@ 
 CC             = @CC@
 INSTALL                = @INSTALL@
-
+USERNAME       = @USERNAME@
+GROUPNAME      = @GROUPNAME@
 
 # Optimize or debug ?
 #      -DDEBUG         even more verbose
@@ -84,19 +85,26 @@ allow.o:  allow.c $(HEADERS)
 
 install: all
 
-       $(INSTALL) -m 111 -o root -s fcron $(DESTSBIN)
-       $(INSTALL) -m 4111 -o root -s fcrontab $(DESTBIN)
+       $(INSTALL) -g root -o root -m 755 -d $(DESTSBIN)
+       $(INSTALL) -g root -o root -m 755 -d $(DESTBIN)
+       $(INSTALL) -g root -o root -m 755 -d $(ETC)
+       $(INSTALL) -g root -o root -m 755 -d $(DESTMAN)/man1
+       $(INSTALL) -g root -o root -m 755 -d $(DESTMAN)/man3
+       $(INSTALL) -g root -o root -m 755 -d $(DESTMAN)/man5
+       $(INSTALL) -g root -o root -m 755 -d $(DESTMAN)/man8
+       $(INSTALL) -g root -o root -m 755 -d $(DESTDOC)/fcron-$(VERSION)
+       $(INSTALL) -g GROUPNAME -o USERNAME -m 700 -d $(FCRONTABS)
+
+       $(INSTALL) -g GROUPNAME -o USERNAME -m 110 -s fcron $(DESTSBIN)
+       $(INSTALL) -g GROUPNAME -o USERNAME -m 4111 -s fcrontab $(DESTBIN)
        test -f $(ETC)/fcron.allow || test -f $(ETC)/fcron.deny || $(INSTALL) -m 700 -o root files/fcron.allow files/fcron.deny $(ETC)
        $(INSTALL) -m 644 -o root doc/fcron.8 $(DESTMAN)/man8
        $(INSTALL) -m 644 -o root doc/fcrontab.1 $(DESTMAN)/man1
        $(INSTALL) -m 644 -o root doc/fcrontab.5 $(DESTMAN)/man5
        $(INSTALL) -m 644 -o root doc/bitstring.3 $(DESTMAN)/man3
        (cd script ; ./sysVinit-install "$(INSTALL)" $(DESTSBIN))
-       mkdir -p $(DESTDOC)/fcron-$(VERSION)
        cd doc; $(INSTALL) -m 644 -o root README LICENSE CHANGES *.html \
                 $(DESTDOC)/fcron-$(VERSION)/
-       mkdir -p $(FCRONTABS)
-       chmod 700 $(FCRONTABS)
 
 
 uninstall:
index 0ff3f615b8ba588cc130b97327e5676ca9cc16db..c8053dfeac2e624cad925e76e8dfacfbdaab6d76 100644 (file)
@@ -49,7 +49,7 @@ AC_CHECK_FUNCS(getcwd gettimeofday mktime putenv strerror setenv)
 dnl Checks for programs.
 
 AC_ARG_WITH(sendmail,
-[  --with-sendmail=PATH    Path to sendmail.],
+[  --with-sendmail=PATH        Path to sendmail.],
 [ case "$withval" in
   no)
     AC_MSG_CHECKING(sendmail)
@@ -88,7 +88,7 @@ Cannot determine path to sendmail: try option --with-sendmail=PATH])
 )
 
 AC_ARG_WITH(shell,
-[  --with-shell=PATH       Path to default shell (by default, path to sh).],
+[  --with-shell=PATH   Path to default shell (by default, path to sh).],
 [ case "$withval" in
   no)
     AC_MSG_CHECKING(shell)
@@ -124,7 +124,7 @@ Cannot determine path to sh: try option --with-shell=PATH])
 )
 
 AC_ARG_WITH(editor,
-[  --with-editor=PATH      Path to default editor (by default, path to vi.],
+[  --with-editor=PATH  Path to default editor (by default, path to vi.],
 [ case "$withval" in
   no)
     AC_MSG_CHECKING(editor)
@@ -161,7 +161,7 @@ Cannot determine path to vi: try option --with-editor=PATH])
 
 AC_MSG_CHECKING(location of etc directory)
 AC_ARG_WITH(etcdir,
-[  --with-etcdir=PATH      Directory containing permission files (default /etc).],
+[  --with-etcdir=PATH  Directory containing permission files (default /etc).],
 [ case "$withval" in
   no)
     AC_MSG_ERROR(Need ETCDIR.)
@@ -208,7 +208,7 @@ fi
 
 AC_MSG_CHECKING(location of spool directory)
 AC_ARG_WITH(spooldir,
-[  --with-spooldir=PATH    Directory containing fcron spool (default /var/spool/fcron).],
+[  --with-spooldir=PATH        Directory containing fcron spool (default /var/spool/fcron).],
 [ case "$withval" in
   no)
     AC_MSG_ERROR(Need SPOOLDIR.)
@@ -256,7 +256,7 @@ AC_SUBST(FCRONTABS)
 if test $getloadavg -eq 0  ; then
 AC_MSG_CHECKING(proc directory)
 AC_ARG_WITH(proc,
-[  --with-proc=PATH        Directory where linux procfs is mounted (default /proc).],
+[  --with-proc=PATH    Directory where linux procfs is mounted (default /proc).],
 [ case "$withval" in
   no)
     AC_MSG_WARN([
@@ -294,7 +294,7 @@ AC_SUBST(PROC)
 fi
 
 AC_ARG_WITH(debug,
-[  --with-debug=CFLAGS     Use default debug flags or CFLAGS if given to compile fcron.],
+[  --with-debug=CFLAGS Use default debug flags or CFLAGS if given to compile fcron.],
 [ case "$withval" in
   no)
     CFLAGS="-O2 -Wall"
@@ -312,7 +312,7 @@ AC_ARG_WITH(debug,
 
 AC_MSG_CHECKING(location of man directory)
 AC_ARG_WITH(MANDIR,
-[  --with-mandir=PATH      Root directory for manual pages.],
+[  --with-mandir=PATH  Root directory for manual pages.],
 [ case "$withval" in
   no)
     AC_MSG_ERROR(Need MANDIR.)
@@ -360,7 +360,7 @@ AC_SUBST(MANDIR)
 
 AC_MSG_CHECKING(location of doc directory)
 AC_ARG_WITH(DOCDIR,
-[  --with-docdir=PATH      Directory containing documentation.],
+[  --with-docdir=PATH  Directory containing documentation.],
 [ case "$withval" in
   no)
     AC_MSG_ERROR(Need DOCDIR.)
@@ -406,6 +406,48 @@ AC_DEFINE_UNQUOTED(DOCDIR, "$docdir")
 AC_SUBST(DOCDIR)
 
 
+AC_MSG_CHECKING(username to run under)
+AC_ARG_WITH(username,
+[ --with-username=USERNAME     Username to run under (default daemon) ],
+[ case "$withval" in
+  no)
+    AC_MSG_ERROR(Need USERNAME.)
+    ;;
+  yes)
+    USERNAME=daemon
+    AC_MSG_RESULT(daemon)
+    ;;
+  *)
+    USERNAME="$withval";
+    AC_MSG_RESULT($withval)
+    ;;
+    esac ],
+    USERNAME=daemon
+    AC_MSG_RESULT(daemon)
+)
+AC_SUBST(USERNAME)
+
+AC_MSG_CHECKING(groupname to run under)
+AC_ARG_WITH(groupname,
+[ --with-groupname=GROUPNAME   Groupname to run under (default daemon) ],
+[ case "$withval" in
+  no)
+    AC_MSG_ERROR(Need GROUPNAME.)
+    ;;
+  yes)
+    GROUPNAME=daemon
+    AC_MSG_RESULT(daemon)
+    ;;
+  *)
+    GROUPNAME="$withval";
+    AC_MSG_RESULT($withval)
+    ;;
+    esac ],
+    GROUPNAME=daemon
+    AC_MSG_RESULT(daemon)
+)
+AC_SUBST(GROUPNAME)
+
 AC_OUTPUT(Makefile)