Skip to content

Commit 00cfbdc

Browse files
committed
Remove the deprecated "-runas" command line option
It has been marked as deprecated two releases ago, so it should be fine now to remove this command line option. Reviewed-by: Daniel P. Berrangé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 921dee4 commit 00cfbdc

File tree

4 files changed

+7
-29
lines changed

4 files changed

+7
-29
lines changed

docs/about/deprecated.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ configurations (e.g. -smp drawers=1,books=1,clusters=1 for x86 PC machine) is
7474
marked deprecated since 9.0, users have to ensure that all the topology members
7575
described with -smp are supported by the target machine.
7676

77-
``-runas`` (since 9.1)
78-
''''''''''''''''''''''
79-
80-
Use ``-run-with user=..`` instead.
81-
82-
8377
User-mode emulator command line arguments
8478
-----------------------------------------
8579

docs/about/removed-features.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,12 @@ to produce an odd effect (rotating input but not display output). But
555555
this was never intended or documented behaviour, so we have dropped
556556
the options along with the machine models they were intended for.
557557

558+
``-runas`` (removed in 10.0)
559+
''''''''''''''''''''''''''''
560+
561+
Use ``-run-with user=..`` instead.
562+
563+
558564
User-mode emulator command line arguments
559565
-----------------------------------------
560566

qemu-options.hx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4976,19 +4976,6 @@ SRST
49764976
``-nodefaults`` option will disable all those default devices.
49774977
ERST
49784978

4979-
#ifndef _WIN32
4980-
DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
4981-
"-runas user change to user id user just before starting the VM\n" \
4982-
" user can be numeric uid:gid instead\n",
4983-
QEMU_ARCH_ALL)
4984-
#endif
4985-
SRST
4986-
``-runas user``
4987-
Immediately before starting guest execution, drop root privileges,
4988-
switching to the specified user. This option is deprecated, use
4989-
``-run-with user=...`` instead.
4990-
ERST
4991-
49924979
DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
49934980
"-prom-env variable=value\n"
49944981
" set OpenBIOS nvram variables\n",
@@ -5176,7 +5163,7 @@ SRST
51765163

51775164
``chroot=dir`` can be used for doing a chroot to the specified directory
51785165
immediately before starting the guest execution. This is especially useful
5179-
in combination with -runas.
5166+
in combination with ``user=...``.
51805167

51815168
``user=username`` or ``user=uid:gid`` can be used to drop root privileges
51825169
before starting guest execution. QEMU will use the ``setuid`` and ``setgid``

system/vl.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,15 +3611,6 @@ void qemu_init(int argc, char **argv)
36113611
/* Nothing to be parsed here. Especially, do not error out below. */
36123612
break;
36133613
#if defined(CONFIG_POSIX)
3614-
case QEMU_OPTION_runas:
3615-
warn_report("-runas is deprecated, use '-run-with user=...' instead");
3616-
if (!os_set_runas(optarg)) {
3617-
error_report("User \"%s\" doesn't exist"
3618-
" (and is not <uid>:<gid>)",
3619-
optarg);
3620-
exit(1);
3621-
}
3622-
break;
36233614
case QEMU_OPTION_daemonize:
36243615
os_set_daemonize(true);
36253616
break;

0 commit comments

Comments
 (0)