Added
Link Here
|
1 |
--- nslcd/passwd.c.orig 2021-11-15 20:40:49.000000000 +0100 |
2 |
+++ nslcd/passwd.c 2023-05-29 19:22:02.234797000 +0200 |
3 |
@@ -63,6 +63,7 @@ |
4 |
const char *attmap_passwd_gecos = "\"${gecos:-$cn}\""; |
5 |
const char *attmap_passwd_homeDirectory = "homeDirectory"; |
6 |
const char *attmap_passwd_loginShell = "loginShell"; |
7 |
+const char *attmap_passwd_loginClass = "loginClass"; |
8 |
|
9 |
/* special properties for objectSid-based searches |
10 |
(these are already LDAP-escaped strings) */ |
11 |
@@ -150,6 +151,7 @@ |
12 |
attmap_add_attributes(set, attmap_passwd_gecos); |
13 |
attmap_add_attributes(set, attmap_passwd_homeDirectory); |
14 |
attmap_add_attributes(set, attmap_passwd_loginShell); |
15 |
+ attmap_add_attributes(set, attmap_passwd_loginClass); |
16 |
passwd_attrs = set_tolist(set); |
17 |
if (passwd_attrs == NULL) |
18 |
{ |
19 |
@@ -428,6 +430,7 @@ |
20 |
char gecos[1024]; |
21 |
char homedir[256]; |
22 |
char shell[64]; |
23 |
+ char lclass[256]; |
24 |
char passbuffer[BUFLEN_PASSWORDHASH]; |
25 |
int i, j; |
26 |
/* get the usernames for this entry */ |
27 |
@@ -541,6 +544,8 @@ |
28 |
myldap_get_dn(entry), attmap_passwd_homeDirectory); |
29 |
/* get the shell for this entry */ |
30 |
attmap_get_value(entry, attmap_passwd_loginShell, shell, sizeof(shell)); |
31 |
+ /* get the login class for this entry */ |
32 |
+ attmap_get_value(entry, attmap_passwd_loginClass, lclass, sizeof(lclass)); |
33 |
/* write the entries */ |
34 |
for (i = 0; usernames[i] != NULL; i++) |
35 |
{ |
36 |
@@ -565,6 +570,7 @@ |
37 |
WRITE_STRING(fp, gecos); |
38 |
WRITE_STRING(fp, homedir); |
39 |
WRITE_STRING(fp, shell); |
40 |
+ WRITE_STRING(fp, lclass); |
41 |
} |
42 |
} |
43 |
} |