|
Line
Link Here
|
| 0 |
-- /usr/share/pyshared/univention/networkaccess.py |
0 |
++ /usr/share/pyshared/univention/networkaccess.py |
|
Lines 238-245
SAMBA_ACCOUNT_FLAG_DISABLED = 'D'
Link Here
|
| 238 |
SAMBA_ACCOUNT_FLAG_LOCKED = 'L' |
238 |
SAMBA_ACCOUNT_FLAG_LOCKED = 'L' |
| 239 |
DISALLOWED_SAMBA_ACCOUNT_FLAGS = frozenset((SAMBA_ACCOUNT_FLAG_DISABLED, SAMBA_ACCOUNT_FLAG_LOCKED, )) |
239 |
DISALLOWED_SAMBA_ACCOUNT_FLAGS = frozenset((SAMBA_ACCOUNT_FLAG_DISABLED, SAMBA_ACCOUNT_FLAG_LOCKED, )) |
| 240 |
|
240 |
|
|
|
241 |
def parseUsername(username): |
| 242 |
'''convert username from host/-format to $-format if required''' |
| 243 |
if not username.startswith('host/'): |
| 244 |
return username |
| 245 |
username = username.split('/', 1)[1] # remove host/ |
| 246 |
username = username.split('.', 1)[0] # remove right of '.' |
| 247 |
return username + '$' |
| 248 |
|
| 241 |
def getNTPasswordHash(ldapConnection, username, stationId): |
249 |
def getNTPasswordHash(ldapConnection, username, stationId): |
| 242 |
'stationId may be None if it was not supplied to the program' |
250 |
'stationId may be None if it was not supplied to the program' |
|
|
251 |
username = parseUsername(username) |
| 243 |
if userToGroup or groupInfo: # proxy UCRV set, UCS@school mode |
252 |
if userToGroup or groupInfo: # proxy UCRV set, UCS@school mode |
| 244 |
if not (checkProxyFilterPolicy(username) or checkNetworkAccess(ldapConnection, username)): |
253 |
if not (checkProxyFilterPolicy(username) or checkNetworkAccess(ldapConnection, username)): |
| 245 |
return None |
254 |
return None |