Openwall Project   /home  Owl  JtR  Pro  crypt  pam_passwdqc  tcb  phpass  scanlogd  popa3d  msulogin  /  Linux  BIND  /  advisories  presentations  /  services  donations  /  wordlists  passwords  /  news  community  lists  wiki  CVSweb  mirrors  signatures
bringing security into open environments
 
Password Recovery Resources on the Net
[<prev] [next>] [<thread-prev] [thread-next>] [month] [year] [list]
Date: Wed, 26 Nov 2003 20:59:35 +0300
From: Solar Designer <solar@...nwall.com>
To: owl-users@...ts.openwall.com
Subject: Re: Bug in Postfix remove script

On Wed, Nov 26, 2003 at 05:44:15PM +0100, Andreas Ericsson wrote:
> > -	rmdir /var/spool/postfix/[^m]*
> > +	rmdir /var/spool/postfix/[^m]* || true

> This will cause rpm to happily move on no matter what the error, which
> isn't the intended behaviour.

Actually it is.

The purpose of this rmdir is to remove directories which are empty,
but leave around those which aren't such that you don't lose your
queued e-mail messages just because you happened to (temporarily?)
uninstall Postfix.

If you install Postfix but don't use it and just uninstall, then
everything gets removed cleanly.

> -	rmdir /var/spool/postfix/[^m]*
> +	find /var/spool/postfix \( -type d -name "[^m]*" \) -delete

This is very different: find is recursive.  A similar effect to the
rmdir may be achieved with find -maxdepth 1, but I don't see the need.

-- 
Alexander Peslyak <solar@...nwall.com>
GPG key ID: B35D3598  fp: 6429 0D7E F130 C13E C929  6447 73C3 A290 B35D 3598
http://www.openwall.com - bringing security into open computing environments

Hosted by DataForce ISP - Powered by Openwall GNU/*/Linux