M. Mohan Kumar 2d40564aaa hw/9pfs: Preserve S_ISGID
In passthrough security model in local fs driver, after a file creation
chown and chmod are done to set the file credentials and mode as requested
by 9p client. But if there was a request to create a file with S_ISGID
bit, doing chown on that file resets the S_ISGID bit. So first call
chown and then invoking chmod with proper mode bit retains the S_ISGID
(if present/requested)

This resulted in LTP mknod02, mknod03, mknod05, open10 test case
failures. This patch fixes this issue.

man 2 chown
When the owner or group of an executable file are changed by an unprivileged
user the S_ISUID  and  S_ISGID mode  bits are cleared.  POSIX does not specify
whether this also should happen when root does the chown(); the Linux behavior
depends on the kernel version.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-30 10:54:16 +05:30
2012-01-30 10:54:16 +05:30
2011-10-06 09:48:07 +02:00
2012-01-13 10:55:56 -06:00
2011-12-06 11:40:00 -02:00
2012-01-15 17:54:23 +01:00
2012-01-12 10:03:28 -06:00
2011-10-21 18:14:30 +02:00
2012-01-13 10:36:59 +00:00
2011-11-07 10:57:36 -06:00
…
…
…
2012-01-13 10:55:56 -06:00
…
2012-01-13 10:21:02 -06:00
2011-12-02 10:50:57 +00:00
2011-08-27 15:42:35 +00:00
2011-10-21 18:14:30 +02:00
2011-12-06 11:40:01 -02:00
2011-12-06 11:40:01 -02:00
2011-12-15 12:40:08 +01:00
2011-12-15 12:40:33 +01:00
2011-09-16 08:26:31 -05:00
2012-01-13 10:37:00 +00:00
…
2012-01-12 10:05:37 -06:00
2012-01-12 10:05:37 -06:00
2012-01-12 10:05:37 -06:00
2012-01-12 10:05:38 -06:00
2011-11-07 08:01:15 +00:00
…
2011-12-06 11:40:00 -02:00
…
2012-01-04 13:34:50 +02:00
2012-01-04 13:34:50 +02:00
2011-12-15 09:20:50 -06:00
2012-01-12 10:34:20 -06:00
2011-11-01 10:58:08 -05:00
2012-01-10 09:36:43 +01:00
2011-10-31 21:52:17 +01:00
2011-10-31 21:52:17 +01:00
…
2011-09-10 16:57:36 +00:00
…
2011-06-07 13:52:10 -05:00
2011-12-02 10:50:57 +00:00
2012-01-13 10:36:59 +00:00
2011-01-20 20:54:21 +00:00
2012-01-13 10:55:56 -06:00
2011-12-06 11:40:01 -02:00
2011-12-02 10:50:57 +00:00
2011-08-27 15:42:35 +00:00
2011-08-27 15:42:35 +00:00
…
2011-10-27 11:48:46 -02:00
2011-10-16 13:13:05 +02:00
2011-10-21 18:14:30 +02:00
2011-10-11 15:57:07 +02:00
2011-10-11 15:57:07 +02:00
…
2012-01-13 10:55:56 -06:00
2011-08-04 15:51:22 +02:00
2011-06-14 03:08:57 +02:00
2011-12-09 11:25:22 +00:00
2011-12-02 10:50:57 +00:00
…
2012-01-12 10:34:20 -06:00
2012-01-13 10:55:56 -06:00
2011-08-27 15:42:35 +00:00
2012-01-13 10:55:56 -06:00
2011-07-21 16:48:13 -03:00
2011-12-06 11:40:01 -02:00
2011-12-22 11:53:59 +01:00
2011-12-22 11:53:59 +01:00
2012-01-12 10:34:20 -06:00
2012-01-13 10:55:56 -06:00
2011-12-22 11:53:58 +01:00
2011-02-09 10:33:54 +02:00
2012-01-13 10:55:56 -06:00
…
2012-01-10 18:23:58 +01:00
…
2012-01-10 18:23:58 +01:00
…
…
2011-08-02 15:53:40 +02:00
2011-12-15 12:40:07 +01:00
2011-10-21 18:14:30 +02:00
2011-03-13 14:44:22 +00:00
2011-12-15 09:20:50 -06:00
2011-12-15 09:20:50 -06:00
2011-11-09 12:06:20 -06:00
2011-12-06 10:07:04 +00:00
…
…
…
…
…
2011-07-21 16:48:13 -03:00
2012-01-13 10:55:56 -06:00
…
…
…
2011-12-11 17:50:43 -06:00
…
…
2011-10-01 09:31:08 +00:00
2011-10-01 09:31:08 +00:00
2011-10-01 09:31:08 +00:00
2012-01-04 13:34:50 +02:00
2011-07-23 11:26:12 -05:00
2011-08-27 15:42:35 +00:00
2012-01-04 02:48:14 +01:00
2011-10-31 21:52:17 +01:00
…
…
…
…
2011-08-27 15:42:35 +00:00
2011-09-10 16:57:39 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
705 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%