View | Details | Raw Unified | Return to bug 220379 | Differences between
and this patch

Collapse All | Expand All

(-)work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.c (+2 lines)
Lines 177-180 Link Here
177
    if (strcasecmp(name, "homeDirectory") == 0)     return &attmap_passwd_homeDirectory;
177
    if (strcasecmp(name, "homeDirectory") == 0)     return &attmap_passwd_homeDirectory;
178
    if (strcasecmp(name, "loginShell") == 0)        return &attmap_passwd_loginShell;
178
    if (strcasecmp(name, "loginShell") == 0)        return &attmap_passwd_loginShell;
179
    if (strcasecmp(name, "loginClass") ==0)         return &attmap_passwd_loginClass;
179
  }
180
  }
180
  else if (map == LM_PROTOCOLS)
181
  else if (map == LM_PROTOCOLS)
Lines 231-234 Link Here
231
        (var != &attmap_shadow_shadowInactive) &&
232
        (var != &attmap_shadow_shadowInactive) &&
232
        (var != &attmap_shadow_shadowExpire) &&
233
        (var != &attmap_shadow_shadowExpire) &&
234
	(var != &attmap_passwd_loginClass) &&
233
        (var != &attmap_shadow_shadowFlag))
235
        (var != &attmap_shadow_shadowFlag))
234
      return NULL;
236
      return NULL;
(-)work.modified/nss-pam-ldapd-0.9.8/nslcd/attmap.h (+1 lines)
Lines 68-71 Link Here
68
extern const char *attmap_shadow_shadowExpire;
68
extern const char *attmap_shadow_shadowExpire;
69
extern const char *attmap_shadow_shadowFlag;
69
extern const char *attmap_shadow_shadowFlag;
70
extern const char *attmap_passwd_loginClass;
70
71
71
/* return a reference to the map specific base variable */
72
/* return a reference to the map specific base variable */
(-)work.modified/nss-pam-ldapd-0.9.8/nslcd/passwd.c (+6 lines)
Lines 64-67 Link Here
64
const char *attmap_passwd_homeDirectory = "homeDirectory";
64
const char *attmap_passwd_homeDirectory = "homeDirectory";
65
const char *attmap_passwd_loginShell    = "loginShell";
65
const char *attmap_passwd_loginShell    = "loginShell";
66
const char *attmap_passwd_loginClass    = "loginClass";
66
67
67
/* special properties for objectSid-based searches
68
/* special properties for objectSid-based searches
Lines 151-154 Link Here
151
  attmap_add_attributes(set, attmap_passwd_homeDirectory);
152
  attmap_add_attributes(set, attmap_passwd_homeDirectory);
152
  attmap_add_attributes(set, attmap_passwd_loginShell);
153
  attmap_add_attributes(set, attmap_passwd_loginShell);
154
  attmap_add_attributes(set, attmap_passwd_loginClass);
153
  passwd_attrs = set_tolist(set);
155
  passwd_attrs = set_tolist(set);
154
  if (passwd_attrs == NULL)
156
  if (passwd_attrs == NULL)
Lines 429-432 Link Here
429
  char homedir[256];
431
  char homedir[256];
430
  char shell[64];
432
  char shell[64];
433
  char lclass[64];
431
  char passbuffer[BUFLEN_PASSWORDHASH];
434
  char passbuffer[BUFLEN_PASSWORDHASH];
432
  int i, j;
435
  int i, j;
Lines 542-545 Link Here
542
  /* get the shell for this entry */
545
  /* get the shell for this entry */
543
  attmap_get_value(entry, attmap_passwd_loginShell, shell, sizeof(shell));
546
  attmap_get_value(entry, attmap_passwd_loginShell, shell, sizeof(shell));
547
  /* get the login class for this entry */
548
  attmap_get_value(entry, attmap_passwd_loginClass, lclass, sizeof(lclass));
544
  /* write the entries */
549
  /* write the entries */
545
  for (i = 0; usernames[i] != NULL; i++)
550
  for (i = 0; usernames[i] != NULL; i++)
Lines 566-569 Link Here
566
            WRITE_STRING(fp, homedir);
571
            WRITE_STRING(fp, homedir);
567
            WRITE_STRING(fp, shell);
572
            WRITE_STRING(fp, shell);
573
	    WRITE_STRING(fp, lclass);
568
          }
574
          }
569
        }
575
        }
(-)work.modified/nss-pam-ldapd-0.9.8/nss/passwd.c (-2 / +2 lines)
Lines 46-51 Link Here
46
  READ_BUF_STRING(fp, result->pw_shell);
46
  READ_BUF_STRING(fp, result->pw_shell);
47
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
47
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
48
  /* set the user access class to an empty string */
48
  /* set the user access class to an empty string only if empty */
49
  result->pw_class = result->pw_name + strlen(result->pw_name);
49
  READ_BUF_STRING(fp, result->pw_class);
50
#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
50
#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
51
  return NSS_STATUS_SUCCESS;
51
  return NSS_STATUS_SUCCESS;

Return to bug 220379