Re: .X11-unix and the sticky bit
Re: .X11-unix and the sticky bit
- Subject: Re: .X11-unix and the sticky bit
- From: Ronnie Misra <email@hidden>
- Date: Tue, 13 Apr 2004 12:39:21 -0700
On Apr 12, 2004, at 2:26 PM, matt shultz wrote:
We run X on display 5 for our application by calling xinit. The
problem
I'm running into is that when a user runs our application for the first
time, .X11-unix gets created in /tmp with the sticky bit set. after X
exists, .X11-unix is still there, with it's sticky bit. that's all
fine
until a different user logs into the computer and tries to run our
application. When they try to launch X there's a permission problem
(they
can't delete - i think - the file X5 from .X11-unix since the sticky
bit
is set). If I chmod 777 .X11-unix all is well. However, since we are
going to be distributing this software, and since .X11-unix resides in
the
tmp directory, simply chmod 777 .X11-unix upon installation is not good
enough. The reason? Because if .X11-unix gets erased from /tmp it
will
be recreated with the sticky bit set and our end users will be
experiencing the problem described above. When I need to know is, how
can i guarentee that .X11-unix is created without the sticky bit set?
.X11-unix is created with the sticky-bit set for a reason - on a
multi-user system, you don't want a user to be able to delete another
user's X11 unix socket. You should find that .X11-unix has the same
permissions on a FreeBSD or Linux system...
Is there a reason you have to hardcode display 5? Why not detect which
socket files are already there and choose a display that you know is
not in use?
X11.app is supposed to delete its socket file when it quits; it sounds
like that's not happening. Are you shutting X11 down properly?
Ronnie
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.