changed config, + became permit and - deny
This commit is contained in:
parent
874ee585b7
commit
fedeed40ec
4
us.c
4
us.c
@ -759,9 +759,9 @@ static int get_config(struct config **conf, int *num)
|
|||||||
break;
|
break;
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
case 0:
|
||||||
if (!strcmp(t, "+"))
|
if (!strcmp(t, "permit"))
|
||||||
c.type = 1;
|
c.type = 1;
|
||||||
else if (!strcmp(t, "-"))
|
else if (!strcmp(t, "deny"))
|
||||||
c.type = 0;
|
c.type = 0;
|
||||||
else
|
else
|
||||||
die("non valid config line %d", i);
|
die("non valid config line %d", i);
|
||||||
|
10
us.conf.5
10
us.conf.5
@ -13,7 +13,7 @@ configuration file.
|
|||||||
.PP
|
.PP
|
||||||
The rules have the following format:
|
The rules have the following format:
|
||||||
.IP
|
.IP
|
||||||
.BR "+|\-"
|
.BR "permit|deny"
|
||||||
.BR user
|
.BR user
|
||||||
as
|
as
|
||||||
.BR target
|
.BR target
|
||||||
@ -67,7 +67,7 @@ The following example will allow root to execute commands as itself without
|
|||||||
requiring a password and without logging:
|
requiring a password and without logging:
|
||||||
.PP
|
.PP
|
||||||
.EX
|
.EX
|
||||||
+ root as root nopass nolog
|
permit root as root nopass nolog
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
This next example allows users in the wheel group to execute commands as
|
This next example allows users in the wheel group to execute commands as
|
||||||
@ -75,7 +75,7 @@ root including a new environment variable IS_WHEEL set to 'yes' and the variable
|
|||||||
EDITOR will be set to ed, the standard unix editor:
|
EDITOR will be set to ed, the standard unix editor:
|
||||||
.PP
|
.PP
|
||||||
.EX
|
.EX
|
||||||
+ :wheel as root IS_WHEEL=yes,EDITOR=ed
|
permit :wheel as root IS_WHEEL=yes,EDITOR=ed
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
In this example the user maria is allowed to execute commands as a member of
|
In this example the user maria is allowed to execute commands as a member of
|
||||||
@ -83,14 +83,14 @@ the group wheel and the session is remembered so that in the next five
|
|||||||
minutes the password won't be needed:
|
minutes the password won't be needed:
|
||||||
.PP
|
.PP
|
||||||
.EX
|
.EX
|
||||||
+ maria as :wheel persist
|
permit maria as :wheel persist
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
This time the user joe is denied to execute commands as anyone who's member of
|
This time the user joe is denied to execute commands as anyone who's member of
|
||||||
the group 'coolppl' because joe is uncool
|
the group 'coolppl' because joe is uncool
|
||||||
.PP
|
.PP
|
||||||
.EX
|
.EX
|
||||||
- joe as :coolppl
|
deny joe as :coolppl
|
||||||
.EE
|
.EE
|
||||||
|
|
||||||
.SH LIMITATIONS
|
.SH LIMITATIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user