]> granicus.if.org Git - fcron/commitdiff
added ./configure's option run-non-privileged
authorthib <thib>
Sat, 10 Aug 2002 20:37:06 +0000 (20:37 +0000)
committerthib <thib>
Sat, 10 Aug 2002 20:37:06 +0000 (20:37 +0000)
Makefile.in
config.h.in
doc/en/faq.sgml
job.c

index 06cb950cc6c286a68e44b9da0a4ae976b0ffacca..2c9698847ed2807a10a738903b73acae8db86438 100644 (file)
@@ -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)
 
 
index a9bb32c862342249ca3d75e0d04b78ae1d503e2d..ff5e170d5635628bceabbd3c017bd34ad7005894 100644 (file)
@@ -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 $ */
 
 
 /* *********************************************************** */
 #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
index 19432770d7dc5b1a3eb4ae0d1f667c02c515efdc..a1bf4c7b78315510a69f0c5d5921af5738d2854e 100644 (file)
@@ -8,7 +8,7 @@ Foundation.
 A copy of the license is included in gfdl.sgml.
 -->
 
-<!-- $Id: faq.sgml,v 1.4 2002-07-19 19:42:53 thib Exp $ -->
+<!-- $Id: faq.sgml,v 1.5 2002-08-10 20:41:52 thib Exp $ -->
 
 <sect1 id="faq">
     <title>Frequently Asked Questions</title>
@@ -202,6 +202,39 @@ linkend="fcron.8">&fcron;(8)</link>, and fcrontab's options &optvolatile;,
 linkend="fcrontab.5">&fcrontab;(5)</link></para>
            </answer>
        </qandaentry>
+       
+       <qandaentry>
+           <question>
+               <para>Can I run fcron without root privileges ?</para>
+           </question>
+           <answer>
+               <para>Yes, you can. To do that, see the following instructions, but
+please note that fcrondyn currently does *not* work without root privileges.</para>
+               <orderedlist>
+                   <listitem>
+                       <para>First, create a directory where you'll install fcron,
+ and some subdirectories :</para>
+                       <screen><prompt>bash$
+</prompt> <command>mkdir /home/thib/fcron</command>
+<prompt>bash$</prompt> <command>cd /home/thib/fcron</command>
+<prompt>bash$</prompt> <command>mkdir doc man spool</command></screen>
+                   </listitem>
+                   <listitem>
+                       <para>Then, run configure with option 
+<option>--with-run-non-privileged</option>, set all user names and groups to yours,
+and set appropriately the paths :</para>
+                       <screen><prompt>bash$
+</prompt> <command>./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</command></screen>
+                   </listitem>
+               </orderedlist>
+               <para>The rest of the installation is described in the
+<link linkend="install">install file</link>.</para>
+           </answer>
+       </qandaentry>
     </qandaset>
 </sect1>
 
diff --git a/job.c b/job.c
index f93a4ac1e23c05bb8294b1358e2783a96ea65dcb..8e039aaf21c1a06d45dd50b6f64567cbd67c121b 100644 (file)
--- 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();