Many systems will clear the set-UID bit on a file when it is opened for writing
Per POSIX:
write() system call
Code:
Upon successful completion, where nbyte is greater than 0,
write() will mark for update the st_ctime and st_mtime fields of the file,
and if the file is a regular file, the S_ISUID and S_ISGID bits of the file
mode may be cleared.
I don't see where open() does that - FWIW.
You're correct in saying that POSIX conforming systems aren't allowed to do this. (Although the standard isn't entirely consistent on this point. The descriptions of ftruncate() and truncate() both say that the S_ISUID and S_ISGID bits may be cleared if they change the size of the file. It is strange that open() with the O_TRUNC flag set doesn't make the same allowance.)
You may have also noticed the RATIONALE in the Base Definitions volume's description of the <sys/stat.h> header:
Quote:
The S_ISUID and S_ISGID bits may be cleared on any write, not just on open( ), as some historical implementations do.
I believe some non-conforming implementations still clear both of these bits on any successful open for writing, although I can't name any examples at this time.
Aloha,
I'm attempting to use a C program to create directories and then use a system call to have another program write .dat files into that directory. I understand that I could use the "system("mkdir directory_name")" function however, I would like my program to create a new directory each time... (3 Replies)
Hi ,
I want to create a new user using c program not with unix adduser command .
is it possible to write a cprogram to create a new user account , it should accept username , grouid , group name and all other privilages .
i can use system calls inside c program to do this .
i will... (5 Replies)
Hi Guru,s/Geek,s
I need help to create RPM names from rpms.
Example :
a2ps-4.14-6.fc10.i386
perl-Email-Find-0.10-2.fc10.noarch
directfb-1.2.7-2.fc10.i386
libid3tag-0.15.1b-7.fc10.i386
apr-util-1.3.7-1.fc10.i386
libquicktime-1.0.3-4.fc10.i386
The Desired Output is :
a2ps... (2 Replies)
I am in process of writing a library which can make any application of my product capable of creating core in the application's log folder with a product friendly core file name programatically. In my library I am registering for certain signals e.g. SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGABRT... (1 Reply)
I am in process of writing a library which can make any application of my product capable of creating core in the application's log folder with a product friendly core file name programatically. In my library I am registering for certain signals e.g. SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGABRT... (5 Replies)
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
I had a question in my test which asked where suppose user B has a program with 's' bit set. Can user A run this program and gain root privileges in any way?
I suppose not as the suid program run with privileges of owner and this program will run with B's privileges and not root. (1 Reply)
Discussion started by: syncmaster
1 Replies
LEARN ABOUT DEBIAN
vmware-user-suid-wrapper
VMWARE-USER-SUID-WRAPPER(8) Open VM Tools VMWARE-USER-SUID-WRAPPER(8)NAME
vmware-user-suid-wrapper - wrapper programm for vmware-user(1)SYNOPSIS
vmware-user-suid-wrapper
DESCRIPTION
Operations on the vmblock(9) filesystem are considered privileged, and as such may only be issued on a file descriptor acquired by root.
This is accomplished by vmware-user-suid-wrapper, a small setuid wrapper whose only purpose is to acquire a filesystem file descriptor,
drop superuser privileges, and then execute vmware-user(1). In particular, prepare the system for vmware-user means that it unmounts the
vmblock file system, unloads the vmblock module, then reloads the module, mounts the file system, and opens a file descriptor that vmware-
user can use to add and remove blocks.
OPTIONS
vmware-user-suid-wrapper has no options.
SEE ALSO vmware-checkvm(1)vmware-hgfsclient(1)vmware-toolbox(1)vmware-toolbox-cmd(1)vmware-user(1)vmware-xferlogs(1)libguestlib(3)libvmtools(3)vmware-guestd(8)vmware-hgfsmounter(8)vmblock(9)vmci(9)vmhgfs(9)vmmemctl(9)vmsock(9)vmsync(9)vmxnet(9)vmxnet3(9)HOMEPAGE
More information about vmware-user-suid-wrapper and the Open VM Tools can be found at <http://open-vm-tools.sourceforge.net/>.
AUTHOR
Open VM Tools were written by VMware, Inc. <http://www.vmware.com/>.
This manual page was put together from homepage materials by Daniel Baumann <daniel.baumann@progress-technologies.net>, for the Debian
project (but may be used by others).
2010.03.20-243334 2010-04-08 VMWARE-USER-SUID-WRAPPER(8)