[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option |
Date: |
Tue, 10 Oct 2017 09:43:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Ian Jackson <address@hidden> writes:
> Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new
> -runasid option"):
>> The last thing the QEMU command line needs is more exotic options. Are
>> you sure we need a new one here? Can we make existing -runas serve?
>> Precedence: Coreutils[*]. Pseudo-code:
>>
>> if argument is a decimal number starting with '+':
>> user ID
>> else if argument is a valid user name:
>> user name
>> else if argument is a valid user ID:
>> user ID
>> else:
>> error
>
> I can do this. So -runas <uid>.<gid> then. I don't think it makes
> sense to try to -runas <uid> because: you wouldn't have a username
> to pass to initgroups: not calling initgroups would be a bear trap;
> and otherwise we wouldn't know what gid to use.
Actually, a numeric UID without group name or ID could be made to work
just fine as long as it maps to a user name. The use case may not be
worth the bother, though.
Using '.' to separate user and group is suboptimal, because POSIX
portable user and group names may contain it:
3.426 User Name
A string that is used to identify a user; see also User Database.
To be portable across systems conforming to IEEE Std 1003.1-2001,
the value is composed of characters from the portable filename
character set. The hyphen should not be used as the first character
of a portable user name.
and
3.276 Portable Filename Character Set
The set of characters from which portable filenames are constructed.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 . _ -
http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html
Coreutils uses ':'. Let's follow its lead.
- [Qemu-devel] [PATCH 1/8] xen: link against xentoolcore, (continued)
[Qemu-devel] [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable, Ian Jackson, 2017/10/04
[Qemu-devel] [PATCH 8/8] RFC configure: do_compiler: Dump some extra info under bash, Ian Jackson, 2017/10/04