public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fchown on unix domain sockets?
@ 2004-10-31 22:55 John M Collins
  2004-11-01 14:20 ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: John M Collins @ 2004-10-31 22:55 UTC (permalink / raw)
  To: linux-kernel

Please CC any reply to jmc AT xisl.com as I'm not subscribed.

I wanted to change the ownership on a unix domain socket in a program (running 
as root) I was writing and I was wondering if "fchown" worked on the socket 
descriptor (after I'd run "bind" of course).

It doesn't, you have to use "chown" on the path name - however "fchown" 
silently does nothing, it doesn't report an error.

I don't mind it not working but I think it should report an error. This is on 
2.6.3 kernel.

I tried it on HP/UX 11 and it gave EINVAL (which the HP manual page doesn't 
document) and on Solaris 9 which likewise silently did nothing.

-- 
John Collins Xi Software Ltd www.xisl.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-11-02  5:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-31 22:55 Fchown on unix domain sockets? John M Collins
2004-11-01 14:20 ` Jan Engelhardt
2004-11-01 14:41   ` John M Collins
2004-11-01 14:49     ` Jan Engelhardt
2004-11-01 15:43       ` John M Collins
2004-11-01 17:27         ` Jan Engelhardt
2004-11-01 22:27       ` David Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox