diff options
Diffstat (limited to 'usr.sbin/ypldap/parse.y')
-rw-r--r-- | usr.sbin/ypldap/parse.y | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y index ae55fda5873..24091d7e234 100644 --- a/usr.sbin/ypldap/parse.y +++ b/usr.sbin/ypldap/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.10 2011/08/28 11:53:16 aschrijver Exp $ */ +/* $OpenBSD: parse.y,v 1.11 2012/04/30 11:28:25 jmatthew Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -96,7 +96,7 @@ typedef struct { %} -%token SERVER FILTER ATTRIBUTE BASEDN BINDDN BINDCRED MAPS CHANGE DOMAIN PROVIDE +%token SERVER FILTER ATTRIBUTE BASEDN BINDDN GROUPDN BINDCRED MAPS CHANGE DOMAIN PROVIDE %token USER GROUP TO EXPIRE HOME SHELL GECOS UID GID INTERVAL %token PASSWD NAME FIXED LIST GROUPNAME GROUPPASSWD GROUPGID MAP %token INCLUDE DIRECTORY CLASS PORT ERROR GROUPMEMBERS @@ -203,6 +203,16 @@ diropt : BINDDN STRING { YYERROR; } free($2); + } + | GROUPDN STRING { + if(strlcpy(idm->idm_groupdn, $2, + sizeof(idm->idm_groupdn)) >= + sizeof(idm->idm_groupdn)) { + yyerror("directory groupdn truncated"); + free($2); + YYERROR; + } + free($2); } | opcode FILTER STRING { if (strlcpy(idm->idm_filters[$1], $3, @@ -356,6 +366,7 @@ lookup(char *s) { "gecos", GECOS }, { "gid", GID }, { "group", GROUP }, + { "groupdn", GROUPDN }, { "groupgid", GROUPGID }, { "groupmembers", GROUPMEMBERS }, { "groupname", GROUPNAME }, |