Lines Matching refs:smbpw

243 smb_pwd_getpwnam(const char *name, smb_passwd_t *smbpw)
247 pw = smb_pwd_getpwnam_core(name, smbpw, B_TRUE);
249 pw = smb_pwd_getpwnam_core(name, smbpw, B_FALSE);
258 * smbpw is a pointer to a buffer allocated by the caller.
263 smb_pwd_getpwuid(uid_t uid, smb_passwd_t *smbpw)
271 return (smb_pwd_ops.pwop_getpwuid(uid, smbpw));
282 pwbuf.pw_pwd = smbpw;
285 if (uid == smbpw->pw_uid) {
286 if ((smbpw->pw_flags & (SMB_PWF_LM | SMB_PWF_NT)))
296 bzero(smbpw, sizeof (smb_passwd_t));
300 return (smbpw);
434 smb_passwd_t smbpw;
473 pwbuf.pw_pwd = &smbpw;
480 if (strcmp(smbpw.pw_name, name) == 0) {
481 err = smb_pwd_chgpwent(&smbpw, password, control);
499 bzero(&smbpw, sizeof (smb_passwd_t));
500 (void) strlcpy(smbpw.pw_name, uxpw.pw_name,
501 sizeof (smbpw.pw_name));
502 smbpw.pw_uid = uxpw.pw_uid;
503 (void) smb_pwd_chgpwent(&smbpw, password, control);
632 smb_pwd_chgpwent(smb_passwd_t *smbpw, const char *password, int control)
636 smbpw->pw_flags |= SMB_PWF_DISABLE;
637 (void) strcpy((char *)smbpw->pw_lmhash, SMB_PWD_DISABLE);
638 (void) strcpy((char *)smbpw->pw_nthash, SMB_PWD_DISABLE);
639 smbpw->pw_flags &= ~(SMB_PWF_LM | SMB_PWF_NT);
643 if ((control & SMB_PWC_ENABLE) && (smbpw->pw_flags & SMB_PWF_DISABLE)) {
645 *smbpw->pw_lmhash = '\0';
646 *smbpw->pw_nthash = '\0';
647 smbpw->pw_flags &= ~(SMB_PWF_LM | SMB_PWF_NT);
652 if (smbpw->pw_flags & SMB_PWF_DISABLE)
661 smbpw->pw_flags &= ~SMB_PWF_LM;
662 *smbpw->pw_lmhash = '\0';
664 smbpw->pw_flags |= SMB_PWF_LM;
665 (void) smb_auth_lm_hash(password, smbpw->pw_lmhash);
668 smbpw->pw_flags |= SMB_PWF_NT;
669 (void) smb_auth_ntlm_hash(password, smbpw->pw_nthash);
721 * smbpw is a pointer to a buffer allocated by the caller.
731 smb_pwd_getpwnam_core(const char *name, smb_passwd_t *smbpw, boolean_t cs)
739 return (smb_pwd_ops.pwop_getpwnam(name, smbpw));
750 pwbuf.pw_pwd = smbpw;
754 err = strcmp(name, smbpw->pw_name);
756 err = strcasecmp(name, smbpw->pw_name);
768 bzero(smbpw, sizeof (smb_passwd_t));
772 return (smbpw);
943 smb_passwd_t smbpw;
965 pwbuf.pw_pwd = &smbpw;
970 uc_node.cn_user.su_name = smbpw.pw_name;
974 uc_newnode->cn_user.su_ctrl = smbpw.pw_flags;
986 user->su_ctrl = smbpw.pw_flags;
988 idm_stat = smb_idmap_getsid(smbpw.pw_uid, SMB_IDMAP_USER, &sid);
991 "for uid=%u (%d)", smbpw.pw_uid, idm_stat);
998 user->su_name = strdup(smbpw.pw_name);