lkml.org 
[lkml]   [2002]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfchmod on a socket?
Hi there,
I'm unsure as to whether this is a bug or not, but if I try to do an
fchmod() on an fd for a UNIX domain socket, it returns success (0), but
does not actually change the permission mode.

--- strace
socket(PF_UNIX, SOCK_DGRAM, 0) = 3
bind(3, {sin_family=AF_UNIX, path="/tmp/log.extended"}, 110) = 0
setsockopt(3, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
fcntl64(3, F_SETFL, O_RDONLY|O_ASYNC) = 0
fchmod(3, 0666) = 0
---

--- socket
File: "/tmp/log.extended"
Size: 0 Blocks: 0 Socket
Device: 1601h/5633d Inode: 193160 Links: 1
Access: (0755/srwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)
---

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

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