1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
--- ldap-pwd.c.orig
+++ ldap-pwd.c
@@ -170,6 +170,15 @@
}
+
+#ifdef HAVE_LOGIN_CLASSES
+ stat =
+ _nss_ldap_assign_attrval (e, AT (loginClass), &pw->pw_class, &buffer,
+ &buflen);
+ if (stat != NSS_SUCCESS)
+ (void) _nss_ldap_assign_emptystring (&pw->pw_class, &buffer, &buflen);
+#endif
+
stat =
_nss_ldap_assign_attrval (e, AT (homeDirectory), &pw->pw_dir, &buffer,
&buflen);
if (stat != NSS_SUCCESS)
--- ldap-schema.c.orig
+++ ldap-schema.c
@@ -334,6 +334,9 @@
#ifdef HAVE_PASSWD_PW_EXPIRE
(*pwd_attrs)[i++] = AT (shadowExpire);
#endif /* HAVE_PASSWD_PW_EXPIRE */
+#ifdef HAVE_LOGIN_CLASSES
+ (*pwd_attrs)[i++] = AT (loginClass);
+#endif
(*pwd_attrs)[i] = NULL;
}
--- ldap-schema.h.orig
+++ ldap-schema.h
@@ -24,7 +24,7 @@
#define _LDAP_NSS_LDAP_LDAP_SCHEMA_H
/* max number of attributes per object class */
-#define ATTRTAB_SIZE 15
+#define ATTRTAB_SIZE 16
/**
* function to initialize global lookup filters.
@@ -153,6 +153,10 @@
#define AT_gecos "gecos"
#define AT_homeDirectory "homeDirectory"
+#ifdef HAVE_LOGIN_CLASSES
+/* FreeBSD extension -Jacob Myers <jacob@whotokspaz.org> */
+#define AT_loginClass "loginClass"
+#endif
/*
* ( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY
* DESC 'Additional attributes for shadow passwords'
|