package apt-cacher
tag 786661 pending
thanks

On Sun, May 31, 2015 at 11:53:52AM +0200, Robert Luberda wrote:
> Mark Hindley pisze:
> 
> Yes, this work, but I think this might be considered as rather insecure
> use of /tmp. You can consider changing init script instead or in
> addition to the change, for example like this:
> 
> 
> diff --git a/init.d/apt-cacher b/init.d/apt-cacher
>   index 2c38b7f..46500f9 100755
>   --- a/init.d/apt-cacher
>   +++ b/init.d/apt-cacher
>   @@ -15,7 +15,8 @@
>    DESC="Apt-Cacher"
>    NAME=apt-cacher
>    DAEMON=/usr/sbin/$NAME
>   -PIDFILE=/var/run/$NAME/$NAME.pid
>   +PIDDIR=/var/run/$NAME
>   +PIDFILE=$PIDDIR/$NAME.pid
>    SCRIPTNAME=/etc/init.d/$NAME
> 
>    # Gracefully exit if the package has been removed.
>   @@ -33,7 +34,12 @@ fi
>    #      Function that starts the daemon/service.
>    #
>    d_start() {
>   -
>   +    # apt-cacher needs $PIDDIR, but is not able to create it in the
> inetd mode
>   +    if test ! -d "$PIDDIR"; then
>   +       mkdir -m 755 "$PIDDIR"
>   +       chown www-data:www-data "$PIDDIR"
>   +    fi
>   +
>        if test "$AUTOSTART" = 1 ; then
>            start-stop-daemon --start --quiet  \
>               --exec $DAEMON -- -R 3 -d -p $PIDFILE $EXTRAOPT && \

Thanks.

Yes, I had thought of that approach, but I was concerned that the user
configurable variable libcurl_socket could get of sync with the RUNDIR specified
in the initscript. But I suppose if folk are going to start moving things
around, they will have to ensure the directories are sane and writable.

Mark


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to