On Sat, Jun 04, 2016 at 01:32:23PM BST, Amit Kulkarni wrote:
> On Sat, Jun 4, 2016 at 1:28 AM, Raf Czlonka <rczlo...@gmail.com> wrote:
> 
> > On Sat, Jun 04, 2016 at 04:19:35AM BST, Amit Kulkarni wrote:
> > > On Fri, Jun 3, 2016 at 4:45 PM, Raf Czlonka <rczlo...@gmail.com> wrote:
> > >
> > > > On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:
> > > > > On 06/03/16 20:26, Todd C. Miller wrote:
> > > > > > Perhaps your sudo binary is linked with an old libc that used
> > > > > > sys_osendsyslog?
> > > > >
> > > > > That's it exactly.
> > > > >
> > > > > It looks like on this machine, I had an old /usr/bin/sudo lying
> > around
> > > > >
> > > > > [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> > > > > -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
> > > > >
> > > > > in addition to the one that came out of the more recent package
> > > > >
> > > > > [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> > > > > -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
> > > > >
> > > > > and with a PATH like this
> > > > >
> > > > > [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> > > > >
> > /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> > > > >
> > bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> > > > > cal/bin:/usr/local/sbin:/usr/games:.
> > > > >
> > > > > it's actually quite obvious.
> > > > >
> > > > > $ doas rm -f /usr/bin/sudo*
> > > > > $ doas rm -f /usr/bins/*sudo*
> > > > >
> > > > > made sudo work again.
> > > > >
> > > > > Note to self: upgrade notes are for reading
> > > >
> > > > Also, 'sysclean' from ports is a very handy utility if one "forgets"
> > > > to read the notes[0] :^)
> > > >
> > > > Regards,
> > > >
> > > > Raf
> > > >
> > > > [0] Even if one *does* read the notes, it is still very useful as it
> > > >     helps to clean-up files and directories not mentioned in the notes
> > > >
> > > >
> > >
> > > +1 for sysclean to check for obsolete packages. sysclean reminds you
> > which
> > > files are obsolete. but be careful deleting the files. I deleted a
> > current
> > > libc.so by mistake.... open a root shell somewhere and then start
> > deleting
> > > carefully, very carefully.
> >
> > Not sure how you managed to do that ;^)
> >
> 
> Let us call it my thinking bug :)
> 

:^)

Anyway, Sebastien provided a real life scenario when that might happen.

> >
> > The only time this might be dangerous is when new packages haven't yet
> > been cut for the new version of, i.e. libc, etc. and they still require
> > the old one.
> >
> 
> When I see those bad system major messages I usually Ctrl + C pkg_add and
> then wait a day or two (sometimes during release a week or two) for the
> next set of packages. Once all system is updated then only I think it makes
> sense to run sysclean.
> 

I always let it finish without any ill effects - there's plenty of
packages which update just fine (shell, Perl, etc.).

> >
> > Otherwise, create a /etc/sysclean.ignore *first* with something like:
> >
> > @include "/etc/changelist"
> > /bsd.up
> > /etc/apm
> > /etc/hotplug/attach
> > /etc/iked.conf
> > /etc/kbdtype
> > /etc/mixerctl.conf
> > /etc/rebound.conf
> > /etc/ssl/private/private.csr
> > /etc/ssl/private/private.key
> > /etc/vi.exrc
> > /etc/wifi
> > /etc/wifi.nwid
> > /snapshots
> > /etc/sysclean.ignore    # BTW, given that one can't specify another file,
> >                         # shouldn't this be implied and thus redundant?
> > ...
> >
> > Inspect if there's nothing which you had missed:
> >
> >         doas sysclean
> >
> > then simply:
> >
> >         doas sysclean | while read $file ; do doas rm -fr "$file" ; done
> >
> 
> Raf, you are brave!

If the output of 'sysclean' differs between two subsequent runs,
then there's a reason to worry.

Sure, static list (i.e. 'cat file | ...') would have been much safer,
and copy-pasting one of the worst ideas.

Raf

Reply via email to