Re: [arch-dev-public] [signoff] openssh 5.4p1-2

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



On Wed, Mar 10, 2010 at 05:16:10PM +0100, Pierre Schmitz wrote:
> Am Mittwoch, 10. März 2010 17:08:45 schrieb Pierre Schmitz:
> > Am Mittwoch, 10. März 2010 16:36:15 schrieb Pierre Schmitz:
> > This is really not my day and I already regret touching this package. :-)
> > The problem with using readlink /proc/$pid/exe is that during an update of
> > a running sshd that link will point nowhere. As a result the restart will
> > fail.
> > 
> > What do you think about using /proc/$pid/cmdline instead?
> 
> Just found out that this wont work with ssh_args set in /ec/conf.d/sshd. My 
> last resort would be stripping that possible "(deleted)" fro mthe readlink 
> output.

Here's another way to check if the pid file is valid:

if pidof sshd | grep -q $(cat /var/run/sshd.pid); then
    echo "pid in /var/run/sshd.pid is valid"
else
    echo "invalid pid"
fi

-- 
Byron Clark


[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