Possible security problem, need information..

Heiko Blume src at scuzzy.in-berlin.de
Mon Mar 25 01:16:01 AEST 1991


jik at athena.mit.edu (Jonathan I. Kamens) writes:

>In article <1991Mar22.000333.22597 at scuzzy.in-berlin.de>, src at scuzzy.in-berlin.de (Heiko Blume) writes:
>|> # mv test2 test
>|> mv: test: 644 mode?y
>|> mv: cannot unlink .
>|> mv: permission denied
>|> 
>|> but what does the 'mv: cannot unlink .' mean???? ain't got no clue...

>  My guess is that you're working on a system that does not have a rename
>system call, so mv works by unlinking the target name, if it exists, then
>creating a hard link from the old source name to the target name, then
>unlinking the old source name.

ISC 2.2.1 does have rename(2) [btw: it even passed the POSIX compliance test
suite (PCTS 1.0) of NIST], but who knows if mv uses it?

>  Since /tmp/test is owned by root, mv can't unlink it.

sure, i just wondered why it said '.' instead of 'test'.

>  Although there appears to be a bug in your version of mv, because it tried
>to print the filename and failed.  Probably a missing argument to fprintf or
>something.

that's what i guess/hope now, too. wouldn't be too nice if it really
tried to unlink(".") ....
-- 
      Heiko Blume <-+-> src at scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home



More information about the Comp.unix.admin mailing list