From: thib Date: Sat, 10 Aug 2002 20:37:06 +0000 (+0000) Subject: added ./configure's option run-non-privileged X-Git-Tag: ver1564~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b35336e7a5428069e3e555c7f11339430621800;p=fcron added ./configure's option run-non-privileged --- diff --git a/Makefile.in b/Makefile.in index 06cb950..2c96988 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ # @configure_input@ -# $Id: Makefile.in,v 1.86 2002-07-19 19:37:01 thib Exp $ +# $Id: Makefile.in,v 1.87 2002-08-10 20:40:59 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 @@ -75,6 +75,13 @@ HEADERSALL = config.h $(SRCDIR)/global.h $(SRCDIR)/log.h $(SRCDIR)/subs.h $(SRCD # do not ci automaticaly generated files and doc (done by doc's Makefile) RCSNOCI=.*\(.html\|VERSION\|MANIFEST\|configure\|install.sh\|doc.*\) +RUN_NON-PRIVILEGED = @RUN_NON_PRIVILEGED@ +ifeq ($(RUN_NON_PRIVILEGED), 1) + BINMODE=111 +else + BINMODE=6111 +endif + ifeq ($(FCRONDYN), 1) all: fcron fcrontab fcrondyn convert-fcrontab files/fcron.conf else @@ -114,10 +121,10 @@ install: all $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m 770 -d $(FCRONTABS) $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 110 -s fcron $(DESTSBIN) - $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m 6111 -s fcrontab $(DESTBIN) - $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 6111 -s fcronsighup $(DESTBIN) + $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m $(BINMODE) -s fcrontab $(DESTBIN) + $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m $(BINMODE) -s fcronsighup $(DESTBIN) ifeq ($(FCRONDYN), 1) - $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m 6111 -s fcrondyn $(DESTBIN) + $(INSTALL) -g $(GROUPNAME) -o $(USERNAME) -m $(BINMODE) -s fcrondyn $(DESTBIN) endif test -f $(ETC)/fcron.allow || test -f $(ETC)/fcron.deny || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.allow $(SRCDIR)/files/fcron.deny $(ETC) test -f $(ETC)/fcron.conf || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.conf $(ETC) @@ -162,6 +169,7 @@ clean: vclean: clean find ./ -name "*~" -exec rm -f {} \; rm -f config.log config.status config.h config.cache Makefile + rm -fR autom4te-* @(cd doc && make clean) diff --git a/config.h.in b/config.h.in index a9bb32c..ff5e170 100644 --- a/config.h.in +++ b/config.h.in @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: config.h.in,v 1.42 2002-07-19 19:39:28 thib Exp $ */ + /* $Id: config.h.in,v 1.43 2002-08-10 20:41:11 thib Exp $ */ /* *********************************************************** */ @@ -171,6 +171,7 @@ #undef DEBUG /* 1 if you want foreground mode by default */ #undef FOREGROUND +#undef RUN_NON_PRIVILEGED /* Define if we should use sete[ug]id() funcs */ #undef USE_SETE_ID diff --git a/doc/en/faq.sgml b/doc/en/faq.sgml index 1943277..a1bf4c7 100644 --- a/doc/en/faq.sgml +++ b/doc/en/faq.sgml @@ -8,7 +8,7 @@ Foundation. A copy of the license is included in gfdl.sgml. --> - + Frequently Asked Questions @@ -202,6 +202,39 @@ linkend="fcron.8">&fcron;(8), and fcrontab's options &optvolatile;, linkend="fcrontab.5">&fcrontab;(5) + + + + Can I run fcron without root privileges ? + + + Yes, you can. To do that, see the following instructions, but +please note that fcrondyn currently does *not* work without root privileges. + + + First, create a directory where you'll install fcron, + and some subdirectories : + bash$ + mkdir /home/thib/fcron +bash$ cd /home/thib/fcron +bash$ mkdir doc man spool + + + Then, run configure with option +, set all user names and groups to yours, +and set appropriately the paths : + bash$ + ./configure --with-run-non-privileged --with-rootname=thib +--with-rootgroup=thib --with-username=thib --with-groupname=thib +--with-etcdir=/home/thib/fcron --with-piddir=/home/thib/fcron +--with-fifodir=/home/thib/fcron --with-spooldir=/home/thib/fcron/spool +--with-docdir=/home/thib/fcron/doc --prefix=/home/thib/fcron + + + The rest of the installation is described in the +install file. + + diff --git a/job.c b/job.c index f93a4ac..8e039aa 100644 --- a/job.c +++ b/job.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.c,v 1.50 2002-07-19 19:30:34 thib Exp $ */ + /* $Id: job.c,v 1.51 2002-08-10 20:37:06 thib Exp $ */ #include "fcron.h" @@ -244,8 +244,10 @@ run_job(struct exe *exeent) die_e("could not pipe()"); } +#ifndef RUN_NON_PRIVILEGED if (change_user(line) < 0) return ; +#endif sig_dfl();