Andreas Metzler <[EMAIL PROTECTED]> writes: > Goswin von Brederlow <[EMAIL PROTECTED]> wrote: > > Steve Greenland <[EMAIL PROTECTED]> writes: > >> YES, I know that the postinst doesn't work if you don't have any user > >> crontabs, feel free to stop reporting the bug -- I have enough. > > >> You can get the installation to complete by editing > >> /var/lib/dpkg/info/cron.postinst and removing these three lines near the > >> end: > > >> for ct in * ; do > >> chown $ct:crontab $ct > >> done > > > This also won't work with too many users. > > No, it will. > > [EMAIL PROTECTED]:/tmp/big> rm * > bash: /bin/rm: Argument list too long > [EMAIL PROTECTED]:/tmp/big> for ct in *; do rm $ct ; done \ > && echo success > success
for doesn't fork so the realy small commandline limit isn't a problem. But are you sure the shell does not read in a full list for "*" and then work through that? Ok, with more users than you can hold in ram you have other problems. > > And lets add a user with homedir "`rm -rf ..`" just for fun. > > Would not hurt. Homedir "a:b"? ==> chown a:b:crontab a:b > [EMAIL PROTECTED]:/tmp/big> bar="\`yes\`" > echo $bar > `yes` I'm allways a bit overcarefull with for loops, globing and splitting. Depending on the shell you get different behaviours. In this simple case it seems to work out right but take the following as an example: (my normal shell is zsh) [EMAIL PROTECTED]:/tmp/bar% touch "a b" [EMAIL PROTECTED]:/tmp/bar% L=`find` [EMAIL PROTECTED]:/tmp/bar% for i in $L; do echo $i; done