Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Apr 1997 02:36:28 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, bugs@freebsd.org, jc@netview.net
Subject:   Re: owner sticky and mv
Message-ID:  <199704251636.CAA03895@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
I wrote:

>diff -c2 cp/utils.c~ cp/utils.c
>*** cp/utils.c~	Sun Feb 23 12:34:58 1997
>--- cp/utils.c	Sun Feb 23 12:35:00 1997
>***************
>*** 160,165 ****
>  	 */
>  
>! 	if (pflag && setfile(fs, to_fd))
>! 		rval = 1;
>  	/*
>  	 * If the source was setuid or setgid, lose the bits unless the
>--- 160,165 ----
>  	 */
>  
>! 	if (pflag)
>! 		rval = setfile(fs, to_fd);
>  	/*
>  	 * If the source was setuid or setgid, lose the bits unless the

This isn't quite right - it sometimes changes rval from 1 to 0.  The
main point of it is not run the `else' clause when setfile() fails.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704251636.CAA03895>