changed config, + became permit and - deny

master
Linux User 3 years ago
parent 874ee585b7
commit fedeed40ec
  1. 4
      us.c
  2. 10
      us.conf.5

@ -759,9 +759,9 @@ static int get_config(struct config **conf, int *num)
break;
switch (n) {
case 0:
if (!strcmp(t, "+"))
if (!strcmp(t, "permit"))
c.type = 1;
else if (!strcmp(t, "-"))
else if (!strcmp(t, "deny"))
c.type = 0;
else
die("non valid config line %d", i);

@ -13,7 +13,7 @@ configuration file.
.PP
The rules have the following format:
.IP
.BR "+|\-"
.BR "permit|deny"
.BR user
as
.BR target
@ -67,7 +67,7 @@ The following example will allow root to execute commands as itself without
requiring a password and without logging:
.PP
.EX
+ root as root nopass nolog
permit root as root nopass nolog
.EE
.PP
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:
.PP
.EX
+ :wheel as root IS_WHEEL=yes,EDITOR=ed
permit :wheel as root IS_WHEEL=yes,EDITOR=ed
.EE
.PP
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:
.PP
.EX
+ maria as :wheel persist
permit maria as :wheel persist
.EE
.PP
This time the user joe is denied to execute commands as anyone who's member of
the group 'coolppl' because joe is uncool
.PP
.EX
- joe as :coolppl
deny joe as :coolppl
.EE
.SH LIMITATIONS

Loading…
Cancel
Save