Ñò
Ã#xPc @ sO d d k Z e d „ Z e e d „ Z e d „ Z e d „ Z e d „ Z d S( iÿÿÿÿNc C sÌ t i d t i ƒ } t i d t i ƒ } | p
| d j o | t j o t St Sn | i ƒ } | i d d ƒ } y | \ } } Wn t j
o t SX| i | ƒ p t S| i | ƒ p t St S( 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 @i N(
t ret compilet It Nonet Truet Falset stript splitt
ValueErrort search( t mailt notEmptyt
usernameREt domainREt st usernamet domain( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt Email s"
c C sw | d j p | i ƒ o | t j o t St Sn | o t i d ƒ } n t i d ƒ } | i | ƒ p t St S( 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( R R R R R R R
( t textR t allowSpacest textRE( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt Plain4 s
c C s9 | d j p | i ƒ o | t j o t St Sn t S( s? A string type. This is much looser in what it allows than plainN( R R R R ( R R ( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt StringK s
c C si t i d ƒ } | o | t j o t S| d j o | t j o t St Sn | i | ƒ p t St S( 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( R R R R R R
( R R R ( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt PathV s
c C s† t i d ƒ } | o | t j o t S| d j o | t j o t St Sn | i | ƒ } | p | | i d ƒ j o t St S( 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_.$-]?$i N( R R R R R t matcht group( R R R t m( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt GoodNamen s
( R R R R R R R R ( ( ( s9 /usr/lib/python2.6/site-packages/ipapython/ipavalidate.pyt