Skip to content

Commit

Permalink
Add support for %group in calife.auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
keltia committed Sep 5, 2014
1 parent 3623daa commit e7efe98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions calife.auth.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.\" modification, are permitted under the GNU General Public Licence.
.\" Look into the COPYING file.
.\"
.\" @(#) $Id: calife.auth.5.in,v 88c4f70961ac 2008/08/19 15:34:11 roberto $
.\" @(#) $Id: calife.auth.5.in,v 25570e2f1dfc 2014/09/05 21:08:02 roberto $
.\""
.Dd September 25, 1994
.Dt CALIFE.AUTH 5
Expand All @@ -23,7 +23,8 @@ follows:
.Bl -tag -width shell -offset indent
.It Ar name
User's login name /
.Ar @group .
.Ar @group /
.Ar %group .
.It Ar shell
User's shell
.It Ar user1,user2,...,usern
Expand All @@ -46,7 +47,10 @@ to specify that any user in the given
.Ar group
is allowed to use
.Nm calife
to become root.
to become root. Alternative syntax using
.Ar %group
is also allowed just like
.Nm sudo .
.Pp
The
.Ar shell
Expand Down Expand Up @@ -82,6 +86,7 @@ is placed in
fcb
roberto:/bin/tcsh
pb::guest,blaireau
%wheel
.Ed
.Sh SEE ALSO
.Xr calife 1 ,
Expand Down
6 changes: 3 additions & 3 deletions db.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
**/

#ifndef lint
static const char * rcsid = "@(#) $Id: db.c,v 29ff9dbb76a9 2012/08/22 08:49:25 roberto $";
static const char * rcsid = "@(#) $Id: db.c,v 25570e2f1dfc 2014/09/05 21:08:02 roberto $";
#endif

#include "config.h" /* GNU configure */
Expand Down Expand Up @@ -129,9 +129,9 @@ verify_auth_info (char * name, char * user_to_be)
MESSAGE_1 ("Line read = |%s|\n", line);
line_name = line;
/*
* Look for a @ as first character (for groups)
* Look for a @ or % as first character (for groups)
*/
if (*line == '@')
if (*line == '@' || *line == '%')
{
group = strdup(line);
group_name = strtok(group, ":");
Expand Down

0 comments on commit e7efe98

Please sign in to comment.