mirror of
https://github.com/slicer69/doas
synced 2024-10-02 22:25:19 +00:00
On Linux doas no longer requires the user to specify the double-dash (--)
prior to a command that accepts arguments. Patch provided by Martijn van Duren.
This commit is contained in:
parent
d49ac8e10c
commit
04b377f6fd
|
@ -89,6 +89,6 @@ Create a new file in the root user's home:
|
||||||
|
|
||||||
doas touch /root/new-file
|
doas touch /root/new-file
|
||||||
|
|
||||||
On Linux commands with arguments should be prefixed by a double-dash (--). Here we remove a directory owned by root:
|
On Linux versions of doas prior to 6.3p1 required commands with arguments to be prefixed by a double-dash (--). From 6.3p1 and onward the double-dash is no longer required. Here we remove a directory owned by root:
|
||||||
|
|
||||||
doas -- rm -rf old-directory
|
doas -- rm -rf old-directory
|
||||||
|
|
2
doas.c
2
doas.c
|
@ -302,7 +302,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
uid = getuid();
|
uid = getuid();
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "a:C:nSsu:")) != -1) {
|
while ((ch = getopt(argc, argv, "+a:C:nSsu:")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
#if defined(USE_BSD_AUTH)
|
#if defined(USE_BSD_AUTH)
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
Loading…
Reference in a new issue