On Wed, May 04, 2022 at 08:03:14AM -0600, Theo de Raadt wrote:
> Sebastien Marie <sema...@online.fr> wrote:
> 
> > semarie@ spoke about integrating some elements inside the installer when he 
> > was 
> > about "clean _other things_". It isn't about "stepping back". Even if the 
> > installer would clean all it is possible to remove safely, I would still 
> > use a 
> > program to list libraries without registered packages using them.
> 
> There is nothing you can do in the installer to solve this problem of
> deleting old libraries.  Old libraries MUST STAY, because sysclean does
> not traverse and inspect all files in the entire filesystem to conclude
> there are no use of them.

I am differenciate what the installer could do, and what I could do.

Old libraries ON MY CONTROLLED SYSTEMS will be removed, because I KNOW that 
they 
could be.

I would not expect the installer to do that (because general case isn't my use 
case).

> > I wrote sysclean because it solves *my* problems regarding maintaining a 
> > system, 
> > and I shared it because it could help *some* others people. It wasn't 
> > created 
> > with intent to solve the general use case for all possibles users.
> 
> The pkg_info blob says:
> 
>     sysclean is a script designed to help remove obsolete files between 
> OpenBSD
>     upgrades.
> 
> But sysclean can help people remove non-obsolete files.  
> 
>     sysclean does not remove any files on the system. It only reports obsolete
>     filenames or packages using out-of-date libraries.
> 
> The sysclean report includes files without doing a comprehensive search to
> validate that they are NOT IN USE.  They are not obsolute, yet they show up
> in the list.

it does, but only in some extent: it only considere base system and packages.

a package could use old libraries, and such libraries will not be listed by 
sysclean.
 
> > You don't like it, fine. Just don't use it.
> 
> This conversation is happening because sysclean makes it too easy for
> people who don't understand the complete system sufficiently, to then
> use rm, and break their system.
> 
> You can make that claim of "Don't use it" against me all day long, but
> people will keep discovering sysclean and potentially using it to break
> their systems.
> 
> I have also pointed out a couple of times now that sysclean ignores the
> lessons of "find -print0" and "xargs -0", and I worry it could find a
> file called
> 
> "/somewhere/matchingpattern/\n/etc/spwd.db"
> 
> Pehraps it won't match such patterns?  I suspec it will.

yes it will. but as sysclean only inspects files under directories controlled 
by 
the admin, it means that the administrator created such files and so they know 
what it is doing.

> And then someone will rm -f `sysclean`.

sysclean isn't designed for such usage.

I could saying the same about 'ls'. Someone will rm -f `ls` and a file named 
"/somewhere/matchingpattern/\n/etc/spwd.db" will do bad thing.

Should we add -0 to ls ? or remove it because of possible stupid usage ?
 
> I think sysclean is below the normal standard for our group.

Yes. ls too. it could hurt users which might call rm -f `ls`. </sarcasm>

-- 
Sebastien Marie

Reply via email to