Re: issue with unsetting 'arch' flag

2010-10-06 Thread Bruce Cran
On Wednesday 06 October 2010 00:50:54 Alexander Best wrote: > `touch ftest && chflags arch ftest && chflags -vv 0 ftest`. > ^^non-root ^^root^^non-root > > chflags claims to have cleared the 'arch' flag (which should be impossible > as non-root user), but indeed has done noth

Re: Timestamps in static libraries

2010-10-06 Thread Erik Cederstrand
Den 06/10/2010 kl. 08.00 skrev Tim Kientzle: > > That's the timestamp on the pseudo-entry used to store the archive > symbol table. (GNU/SysV ar files use a pseudo-entry named "/" to > store the symbol table. Since '/' is added to end of names in this > format, this is essentially an entry wit

Re: Timestamps in static libraries

2010-10-06 Thread perryh
Erik Cederstrand wrote: > It seems I can at least normalize the .a files using something > like the following to weed out timestamps and uid/gid: > > % ar -x /usr/lib/libfetch.a > % chown 0:0 * > % touch -t 19700101 * > % ar -r libfetch.a `ar -t /usr/lib/libfetch.a` > > ... Unfortunately it s

Re: Timestamps in static libraries

2010-10-06 Thread Erik Cederstrand
Den 06/10/2010 kl. 10.06 skrev per...@pluto.rain.com: > Erik Cederstrand wrote: > >> It seems I can at least normalize the .a files using something >> like the following to weed out timestamps and uid/gid: >> >> % ar -x /usr/lib/libfetch.a >> % chown 0:0 * >> % touch -t 19700101 * >> % ar

Re: Timestamps in static libraries

2010-10-06 Thread Erik Cederstrand
Den 06/10/2010 kl. 08.00 skrev Tim Kientzle: >> >> % diff mod.strings orig.strings >> 2c2 >> < / 1286312209 0 0 0 958 ` >> --- >>> / 1269146263 0 0 0 958 ` > > That's the timestamp on the pseudo-entry used to store the archive

Re: Timestamps in static libraries

2010-10-06 Thread Erik Cederstrand
Den 06/10/2010 kl. 13.07 skrev Erik Cederstrand: > Is something like the following acceptable? Without risking changes to > buildworld/distribution just now, this would allow me to dump contents of an > archive and re-insert them with '0' for mtime, uid and gid before checking > checksums, wit

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Garrett Cooper
On Tue, Oct 5, 2010 at 4:50 PM, Alexander Best wrote: > hi there, > > i think the following example shows the problem better than a long > explanation: > > `touch ftest && chflags arch ftest && chflags -vv 0 ftest`. >  ^^non-root     ^^root                ^^non-root > > chflags claims to have cle

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Alexander Best
On Wed Oct 6 10, Garrett Cooper wrote: > On Tue, Oct 5, 2010 at 4:50 PM, Alexander Best wrote: > > hi there, > > > > i think the following example shows the problem better than a long > > explanation: > > > > `touch ftest && chflags arch ftest && chflags -vv 0 ftest`. > >  ^^non-root     ^^root

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Garrett Cooper
On Wed, Oct 6, 2010 at 10:35 AM, Alexander Best wrote: > On Wed Oct  6 10, Garrett Cooper wrote: >> On Tue, Oct 5, 2010 at 4:50 PM, Alexander Best wrote: >> > hi there, >> > >> > i think the following example shows the problem better than a long >> > explanation: >> > >> > `touch ftest && chflag

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Alexander Best
On Wed Oct 6 10, Garrett Cooper wrote: > On Wed, Oct 6, 2010 at 10:35 AM, Alexander Best wrote: > > On Wed Oct  6 10, Garrett Cooper wrote: > >> On Tue, Oct 5, 2010 at 4:50 PM, Alexander Best wrote: > >> > hi there, > >> > > >> > i think the following example shows the problem better than a long

Re: sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
Oops =) This version will use grep(1) if installed. Diff below. dte...@dt.vicor.com Desktop $ diff -pub sysconf.txt{.orig,} --- sysconf.txt.orig2010-10-06 13:50:29.0 -0700 +++ sysconf.txt 2010-10-06 13:50:45.0 -0700 @@ -349,8 +349,7 @@ depend sysconf_set 'local' 'sysconf' '['

sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
Hello fellow freebsd-hackers, Long-time hacker, first-time poster. I'd like to share a shell script that I wrote for FreeBSD system administration. The attached shell script works similar to sysctl(8), but rather than querying or working on sysctl MIBs, it instead works on the /etc/rc.conf (and

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Sergey Kandaurov
On 6 October 2010 23:38, Alexander Best wrote: > On Wed Oct  6 10, Garrett Cooper wrote: >> On Wed, Oct 6, 2010 at 10:35 AM, Alexander Best wrote: >> > On Wed Oct  6 10, Garrett Cooper wrote: >> >> On Tue, Oct 5, 2010 at 4:50 PM, Alexander Best >> >> wrote: >> >> > hi there, >> >> > >> >> > i t

Re: sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Garrett Cooper
On Wed, Oct 6, 2010 at 1:45 PM, Devin Teske wrote: > Hello fellow freebsd-hackers, > > Long-time hacker, first-time poster. > > I'd like to share a shell script that I wrote for FreeBSD system > administration. > > The attached shell script works similar to sysctl(8), but rather than > querying or

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Garrett Cooper
On Wed, Oct 6, 2010 at 3:01 PM, Sergey Kandaurov wrote: > On 6 October 2010 23:38, Alexander Best wrote: >> On Wed Oct  6 10, Garrett Cooper wrote: >>> On Wed, Oct 6, 2010 at 10:35 AM, Alexander Best wrote: >>> > On Wed Oct  6 10, Garrett Cooper wrote: >>> >> On Tue, Oct 5, 2010 at 4:50 PM, Alex

Re: sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Brandon Gooch
On Wed, Oct 6, 2010 at 3:45 PM, Devin Teske wrote: > Hello fellow freebsd-hackers, > > Long-time hacker, first-time poster. > > I'd like to share a shell script that I wrote for FreeBSD system > administration. > > The attached shell script works similar to sysctl(8), but rather than > querying or

Re: sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
On Wed, 2010-10-06 at 18:09 -0500, Brandon Gooch wrote: > On Wed, Oct 6, 2010 at 3:45 PM, Devin Teske wrote: > > Hello fellow freebsd-hackers, > > > > Long-time hacker, first-time poster. > > > > I'd like to share a shell script that I wrote for FreeBSD system > > administration. > > > > The attac

Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
On Oct 6, 2010, at 4:09 PM, Brandon Gooch wrote: > On Wed, Oct 6, 2010 at 3:45 PM, Devin Teske wrote: >> Hello fellow freebsd-hackers, >> >> Long-time hacker, first-time poster. >> >> I'd like to share a shell script that I wrote for FreeBSD system >> administration. >> > > It seems the list

Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
On Oct 6, 2010, at 8:29 PM, Devin Teske wrote: > > On Oct 6, 2010, at 4:09 PM, Brandon Gooch wrote: > >> On Wed, Oct 6, 2010 at 3:45 PM, Devin Teske wrote: >>> Hello fellow freebsd-hackers, >>> >>> Long-time hacker, first-time poster. >>> >>> I'd like to share a shell script that I wrote fo

Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread jhell
On 10/06/2010 23:29, Devin Teske wrote: I am not saying this to sound like I am shooting down this script but from the looks of it, I see no real advantage over the way a FreeBSD system is configured already. You could probably point these out though. With that noted what advantage does this scri

Re: issue with unsetting 'arch' flag

2010-10-06 Thread Garrett Cooper
On Wed, Oct 6, 2010 at 4:03 PM, Garrett Cooper wrote: > On Wed, Oct 6, 2010 at 3:01 PM, Sergey Kandaurov wrote: >> On 6 October 2010 23:38, Alexander Best wrote: >>> On Wed Oct  6 10, Garrett Cooper wrote: On Wed, Oct 6, 2010 at 10:35 AM, Alexander Best wrote: > On Wed Oct  6 10

Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-06 Thread Devin Teske
On Oct 6, 2010, at 9:49 PM, jhell wrote: > On 10/06/2010 23:29, Devin Teske wrote: > > I see no real advantage If you had to administer thousands of FreeBSD systems, you would. This script is obviously targeted to those for which are mentioned in the header... "system administrators, power-us