LWN.net Logo

Distribution of security fixes

Distribution of security fixes

Posted Aug 26, 2004 19:16 UTC (Thu) by jreiser (subscriber, #11027)
In reply to: Distribution of security fixes by rwmj
Parent article: Distribution of security fixes

Other lessons: Syntax with terminators tends to be more secure than syntax with separators, because 1:1 has no boundary case that n:(n-1) has. The shell could offer builtin procedures for appending and pre-pending to separated lists.


(Log in to post comments)

Distribution of security fixes

Posted Sep 2, 2004 12:47 UTC (Thu) by ingvar (guest, #1530) [Link]

It (sort-of) exists in PSIX-compliant shells...

FOO=${FOO+$FOO:}/usr/local/lib # should do the trick

ingvar@gruk$ FOO=${FOO+$FOO:}/usr/local/lib
ingvar@gruk$ echo $FOO
/usr/local/lib
ingvar@gruk$ FOO=${FOO+$FOO:}/evil/cracker/path
ingvar@gruk$ echo $FOO
/usr/local/lib:/evil/cracker/path

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds