Hello community, here is the log from the commit of package fetchmail checked in at Fri Jun 2 02:02:03 CEST 2006. -------- --- fetchmail/fetchmail.changes 2006-04-03 17:09:50.000000000 +0200 +++ fetchmail/fetchmail.changes 2006-06-01 16:43:48.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jun 1 16:43:40 CEST 2006 - sbrabec@suse.cz + +- By default run as non-root user fetchmail (159764#c1). +- Implemented "oneshot" in the init script (159764#c8). + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fetchmail.spec ++++++ --- /var/tmp/diff_new_pack.MiAA6c/_old 2006-06-02 02:01:42.000000000 +0200 +++ /var/tmp/diff_new_pack.MiAA6c/_new 2006-06-02 02:01:42.000000000 +0200 @@ -16,7 +16,7 @@ Group: Productivity/Networking/Email/Utilities Autoreqprov: on Version: 6.3.2 -Release: 9 +Release: 15 Source: %{name}-%{version}.tar.bz2 Source1: %{name}.init Source2: %{name}.logrotate @@ -124,6 +124,10 @@ mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp sysconfig.%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates +%pre +usr/sbin/useradd -r -o -g daemon -s /bin/false \ + -c "mail retrieval daemon" -d /usr/bin fetchmail 2>/dev/null || : + %post %{fillup_and_insserv} @@ -152,6 +156,9 @@ %doc %{_mandir}/man1/fetchmailconf.1.gz %changelog -n fetchmail +* Thu Jun 01 2006 - sbrabec@suse.cz +- By default run as non-root user fetchmail (159764#c1). +- Implemented "oneshot" in the init script (159764#c8). * Mon Apr 03 2006 - sbrabec@suse.cz - Backported fixes for two crashes (159764#c9, 159764#c10). * Wed Jan 25 2006 - mls@suse.de ++++++ fetchmail.init ++++++ --- fetchmail/fetchmail.init 2004-09-24 14:00:42.000000000 +0200 +++ fetchmail/fetchmail.init 2006-04-03 15:36:28.000000000 +0200 @@ -39,16 +39,19 @@ else exit 6; fi; } # Read config -FETCHMAIL_POLLING_INTERVAL=600 -FETCHMAIL_FETCHALL=yes -FETCHMAIL_FETCHALL_OPTION= -FETCHMAIL_SILENT=no -FETCHMAIL_SILENT_OPTION= -FETCHMAIL_EXPERT_OPTIONS= +FETCHMAIL_POLLING_INTERVAL="600" +FETCHMAIL_FETCHALL="yes" +FETCHMAIL_SILENT="no" +FETCHMAIL_USER="fetchmail" +FETCHMAIL_EXPERT_OPTIONS="" + . $FETCHMAIL_CONFIG + +FETCHMAIL_FETCHALL_OPTION= if [ $FETCHMAIL_FETCHALL = "yes" ] ; then FETCHMAIL_FETCHALL_OPTION=" -a" fi +FETCHMAIL_SILENT_OPTION= if [ $FETCHMAIL_SILENT = "yes" ] ; then FETCHMAIL_SILENT_OPTION=" -s" fi @@ -88,11 +91,22 @@ # considered a success. case "$1" in + oneshot) + # Check for mails once just now. + if checkproc $FETCHMAIL_BIN ; then + # Trigger fetching of existing daemon. Root UID is OK. + su $FETCHMAIL_USER -c $FETCHMAIL_BIN + else + startproc -u $FETCHMAIL_USER $FETCHMAIL_BIN -d 0$FETCHMAIL_FETCHALL_OPTION$FETCHMAIL_SILENT_OPTION $FETCHMAIL_EXPERT_OPTIONS -f $FETCHMAIL_RC -L /var/log/fetchmail 2>&1 + fi + # Remember status and don'ŧ be verbose + rc_status + ;; start) echo -n "Starting fetchmail" ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. - startproc $FETCHMAIL_BIN -d $FETCHMAIL_POLLING_INTERVAL$FETCHMAIL_FETCHALL_OPTION$FETCHMAIL_SILENT_OPTION $FETCHMAIL_EXPERT_OPTIONS -f $FETCHMAIL_RC -L /var/log/fetchmail 2>&1 + startproc -u $FETCHMAIL_USER $FETCHMAIL_BIN -d $FETCHMAIL_POLLING_INTERVAL$FETCHMAIL_FETCHALL_OPTION$FETCHMAIL_SILENT_OPTION $FETCHMAIL_EXPERT_OPTIONS -f $FETCHMAIL_RC -L /var/log/fetchmail 2>&1 # Remember status and be verbose rc_status -v @@ -188,7 +202,7 @@ test $FETCHMAIL_CONFIG -nt /var/run/fetchmail.pid || test $FETCHMAIL_RC -nt /var/run/fetchmail.pid && echo reload ;; *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" + echo "Usage: $0 {oneshot|start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac ++++++ sysconfig.fetchmail ++++++ --- fetchmail/sysconfig.fetchmail 2004-09-24 13:56:57.000000000 +0200 +++ fetchmail/sysconfig.fetchmail 2006-06-01 16:03:22.000000000 +0200 @@ -7,7 +7,7 @@ # Polling interval in seconds for daemon mode. Mails are regularly # fetched in this interval. # -FETCHMAIL_POLLING_INTERVAL=600 +FETCHMAIL_POLLING_INTERVAL="600" ## Type: yesno ## Default: yes @@ -16,7 +16,7 @@ # retrieve only new messages and keep old (seen) messages, disable # this option. # -FETCHMAIL_FETCHALL=yes +FETCHMAIL_FETCHALL="yes" ## Type: yesno ## Default: no @@ -25,12 +25,23 @@ # not want to log every single message fetchmail downloads or keeps on # the server every time it polls, enable this option. # -FETCHMAIL_SILENT=no +FETCHMAIL_SILENT="no" + +## Type: list(fetchmail,root) +## Default: fetchmail +# +# Fetchmail runs by default as a non-root user. This is more secure, but +# can cause problems when using delivery via MDA. In this case, change +# it to "root". +# +FETCHMAIL_USER="fetchmail" ## Type: string ## Default: "" # # Any additional fetchmail options. See fetchmail(1) manual page for -# more information. +# more information. If you want to use --mda option, it may be required +# to change FETCHMAIL_USER to root. Consult your MDA documentation for +# more. # -FETCHMAIL_EXPERT_OPTIONS= +FETCHMAIL_EXPERT_OPTIONS="" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org