lkml.org 
[lkml]   [1999]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Setuid bits get dropped on fs-mounted partitions (2.2.2-ac7) !?!?
From
Date
alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > The setuid file is testit.dpkg-new which gets chmod'ed to 6775, but
> > for some reason the setattr gets queued before the write and the
> > kernel must be removing the setuid bits because of the write...
>
> I take it the program actually executes the chmod after it finishes writing ?

If you have asynchronous writes, and call 'fchmod' on the open file,
this problem may indeed occur. Worse: if you call fchown you may end
up making the file unwritable.

Does anybody know what POSIX et al. say about this sort of question?
Are you required to issue an 'fsync' or 'fdatasync' before calling
fchmod/fchown on an open file?

i.e. Is this a bug in dpkg or in the NFS client?

Cheers,
Trond

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.047 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site