FreeBSD Bugzilla – Attachment 183936 Details for
Bug 220379
[patch] net/nss-pam-ldapd: introducing very basic LOGIN_CLASS(3) support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
nss-pam-ldapd-0.9.8.loginClass.patch
nss-pam-ldapd-0.9.8.loginClass.patch_v2 (text/plain), 3.28 KB, created by
Marek Zarychta
on 2017-06-30 08:38:55 UTC
(
hide
)
Description:
nss-pam-ldapd-0.9.8.loginClass.patch
Filename:
MIME Type:
Creator:
Marek Zarychta
Created:
2017-06-30 08:38:55 UTC
Size:
3.28 KB
patch
obsolete
>diff -r -U2 work/nss-pam-ldapd-0.9.8/nslcd/attmap.c work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.c >--- work/nss-pam-ldapd-0.9.8/nslcd/attmap.c 2016-06-09 08:30:23.000000000 +0200 >+++ work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.c 2017-06-30 09:23:52.996163000 +0200 >@@ -177,4 +177,5 @@ > if (strcasecmp(name, "homeDirectory") == 0) return &attmap_passwd_homeDirectory; > if (strcasecmp(name, "loginShell") == 0) return &attmap_passwd_loginShell; >+ if (strcasecmp(name, "loginClass") ==0) return &attmap_passwd_loginClass; > } > else if (map == LM_PROTOCOLS) >@@ -231,4 +232,5 @@ > (var != &attmap_shadow_shadowInactive) && > (var != &attmap_shadow_shadowExpire) && >+ (var != &attmap_passwd_loginClass) && > (var != &attmap_shadow_shadowFlag)) > return NULL; >diff -r -U2 work/nss-pam-ldapd-0.9.8/nslcd/attmap.h work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.h >--- work/nss-pam-ldapd-0.9.8/nslcd/attmap.h 2016-06-09 08:30:23.000000000 +0200 >+++ work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.h 2017-06-30 08:50:13.731810000 +0200 >@@ -68,4 +68,5 @@ > extern const char *attmap_shadow_shadowExpire; > extern const char *attmap_shadow_shadowFlag; >+extern const char *attmap_passwd_loginClass; > > /* return a reference to the map specific base variable */ >diff -r -U2 work/nss-pam-ldapd-0.9.8/nslcd/passwd.c work.modified/nss-pam-ldapd-0.9.8/nslcd/passwd.c >--- work/nss-pam-ldapd-0.9.8/nslcd/passwd.c 2017-06-21 00:02:23.000000000 +0200 >+++ work.modified/nss-pam-ldapd-0.9.8/nslcd/passwd.c 2017-06-30 09:24:29.368723000 +0200 >@@ -64,4 +64,5 @@ > const char *attmap_passwd_homeDirectory = "homeDirectory"; > const char *attmap_passwd_loginShell = "loginShell"; >+const char *attmap_passwd_loginClass = "loginClass"; > > /* special properties for objectSid-based searches >@@ -151,4 +152,5 @@ > attmap_add_attributes(set, attmap_passwd_homeDirectory); > attmap_add_attributes(set, attmap_passwd_loginShell); >+ attmap_add_attributes(set, attmap_passwd_loginClass); > passwd_attrs = set_tolist(set); > if (passwd_attrs == NULL) >@@ -429,4 +431,5 @@ > char homedir[256]; > char shell[64]; >+ char lclass[64]; > char passbuffer[BUFLEN_PASSWORDHASH]; > int i, j; >@@ -542,4 +545,6 @@ > /* get the shell for this entry */ > attmap_get_value(entry, attmap_passwd_loginShell, shell, sizeof(shell)); >+ /* get the login class for this entry */ >+ attmap_get_value(entry, attmap_passwd_loginClass, lclass, sizeof(lclass)); > /* write the entries */ > for (i = 0; usernames[i] != NULL; i++) >@@ -566,4 +571,5 @@ > WRITE_STRING(fp, homedir); > WRITE_STRING(fp, shell); >+ WRITE_STRING(fp, lclass); > } > } >diff -r -U2 work/nss-pam-ldapd-0.9.8/nss/passwd.c work.modified/nss-pam-ldapd-0.9.8/nss/passwd.c >--- work/nss-pam-ldapd-0.9.8/nss/passwd.c 2016-07-27 16:25:01.000000000 +0200 >+++ work.modified/nss-pam-ldapd-0.9.8/nss/passwd.c 2017-06-30 09:04:33.858834000 +0200 >@@ -46,6 +46,6 @@ > READ_BUF_STRING(fp, result->pw_shell); > #ifdef HAVE_STRUCT_PASSWD_PW_CLASS >- /* set the user access class to an empty string */ >- result->pw_class = result->pw_name + strlen(result->pw_name); >+ /* set the user access class to an empty string only if empty */ >+ READ_BUF_STRING(fp, result->pw_class); > #endif /* HAVE_STRUCT_PASSWD_PW_CLASS */ > return NSS_STATUS_SUCCESS;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220379
:
183936
|
242486