Ñò Ã#xPc@sOddkZed„Zeed„Zed„Zed„Zed„ZdS(iÿÿÿÿNcCsÌtidtiƒ}tidtiƒ}| p |djo|tjotStSn|iƒ}|iddƒ}y|\}}Wntj otSX|i |ƒptS|i |ƒptStS(sÄDo some basic validation of an e-mail address. Return True if ok Return False if not If notEmpty is True the this will return an error if the field is "" or None. s^[^ \t\n\r@<>()]+$s ^[a-z0-9][a-z0-9\.\-_]*\.[a-z]+$t@iN( tretcompiletItNonetTruetFalsetstriptsplitt ValueErrortsearch(tmailtnotEmptyt usernameREtdomainREtstusernametdomain((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pytEmails"  cCsw|djp|iƒ o|tjotStSn|otidƒ}ntidƒ}|i|ƒptStS(sÄDo some basic validation of a plain text field Return True if ok Return False if not If notEmpty is True the this will return an error if the field is "" or None. s^[a-zA-Z_\-0-9\'\ ]*$s^[a-zA-Z_\-0-9\']*$N(RRRRRRR (ttextR t allowSpacesttextRE((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pytPlain4s cCs9|djp|iƒ o|tjotStSntS(s?A string type. This is much looser in what it allows than plainN(RRRR(RR ((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pytStringKs  cCsitidƒ}| o|tjotS|djo|tjotStSn|i|ƒptStS(s¸Do some basic validation of a path Return True if ok Return False if not If notEmpty is True the this will return an error if the field is "" or None. s^[a-zA-Z_\-0-9\\ \.\/\\:]*$N(RRRRRR (RR R((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pytPathVs  cCs†tidƒ}| o|tjotS|djo|tjotStSn|i|ƒ}| p||idƒjotStS(s&From shadow-utils: User/group names must match gnu e-regex: [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]? as a non-POSIX, extension, allow "$" as the last char for sake of Samba 3.x "add machine script" Return True if ok Return False if not s3^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?$iN(RRRRRtmatchtgroup(RR Rtm((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pytGoodNamens   (RRRRRRRR(((s9/usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyts