From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,b69d377feb5a8a2 X-Google-Attributes: gid10952f,public X-Google-Thread: 10872d,d4c1f7c0fe672a4 X-Google-Attributes: gid10872d,public X-Google-Thread: fcda7,d4c1f7c0fe672a4 X-Google-Attributes: gidfcda7,public X-Google-Thread: 1070f0,d4c1f7c0fe672a4 X-Google-Attributes: gid1070f0,public X-Google-Thread: 1020c6,d4c1f7c0fe672a4 X-Google-Attributes: gid1020c6,public X-Google-Thread: 1164f8,d4c1f7c0fe672a4 X-Google-Attributes: gid1164f8,public From: peter@baileynm.com (Peter da Silva) Subject: Re: Different UNIX pro's and con's. Date: 1998/09/21 Message-ID: <6u67ug$ccd@web.nmti.com>#1/1 X-Deja-AN: 393383278 References: <35F71814.1E0B911C@iakom.com> <6u5v9e$f0i$1@pravda.ucr.edu> <36069D3E.10DF1CFA@llnl.gov> <36069F96.E8127ED3@llnl.gov> Organization: Bailey Network Management Newsgroups: comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec,comp.security.unix In article <36069F96.E8127ED3@llnl.gov>, Jim Mellander wrote: >> Why not fork off a child, change the EUID to the owner of the file, and >> delete the file as the owner. If the perms on system directories are >> set correctly, even a symlink atack would fail. This is massively >> wasteful of system resources (1 fork/file), but since the /tmp sweep is >> usually run in the wee hours of the morning, that wouldn't be so bad. >> Some Unices let you switch back & forth between EUID & Real UID, so this >> may not apply. This will protect files owned by "root". >If the program decides to delete a file, change the owner of the file to >'nobody' (remember we're running as root here), then delete the file as >'nobody'. Then this would work even for files owned by root. This would allow you to change the permissions of the file to "nobody". The real solution is to remove the directory name race by pinning the directory down with a "cd". -- In hoc signo hack, Peter da Silva `-_-' "Milloin halasit viimeksi suttasi?" 'U` "Tell init(8) to lock-n-load, we're goin' zombie slaying!"