Re: [PATCH (dbscripts)] Fix permissions of incoming packages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Mar 9, 2010 at 7:21 PM, Andrea Scarpino <andrea@xxxxxxxxxxxxx> wrote:
> On Wednesday 10 March 2010 02:15:32 Dan McGee wrote:
>> Inline them; that way they can be reviewed.
>>
>> -Dan
> From 7a5c0584a3ad2fcf14659f5028534887bf929cf1 Mon Sep 17 00:00:00 2001
> From: Andrea Scarpino <andrea@xxxxxxxxxxxxx>
> Date: Wed, 10 Mar 2010 02:01:57 +0100
> Subject: [PATCH] fix permissions of incoming packages
>
> ---
>  db-update |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/db-update b/db-update
> index 0973bf3..7b771a3 100755
> --- a/db-update
> +++ b/db-update
> @@ -222,6 +222,7 @@ for current_arch in ${ARCHES[@]}; do
>                                if ! /bin/cp "$f" "$ftppath/"; then
>                                        die "error: failure while copying files
> to $ftppath"
>                                fi
> +                               chmod 664 $ftppath/$f
>                        done
>                fi
>                if [ $(getpkgfiles "$WORKDIR/build/"*-any$PKGEXT 2>/dev/null |
> wc -l) != 0 ]; then
> @@ -230,6 +231,7 @@ for current_arch in ${ARCHES[@]}; do
>                                if ! /bin/cp "$f" "$ftppath_any"; then
>                                        die "error: failure while copying files
> to $ftppath_any"
>                                fi
> +                               chmod 664 $ftppath/$f
>                                bf=$(basename $f)
>                                if ! ln -s "../any/$bf" "$ftppath/$bf"; then
>                                        die "error: failed to make link for
> $bf."
> --

Seems sane; but maybe do the chmod before copying it into that
directory rather than after? That way files never set foot in there
with the wrong permissions (even if only for almost zero time).

-Dan

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux