Lines Matching defs:account

64  * Looks up the given name in local account databases:
69 * If the account is found, its information is populated
74 * The type of account is specified by 'type', which can be user,
89 * NT_STATUS_NOT_FOUND This is not a local account
90 * NT_STATUS_NONE_MAPPED It's a local account but cannot be
96 smb_account_t *account)
103 bzero(account, sizeof (smb_account_t));
121 account->a_type = SidTypeDomain;
122 account->a_name = strdup("");
123 account->a_domain = strdup(di.di_nbname);
124 account->a_sid = smb_sid_dup(di.di_binsid);
125 account->a_domsid = smb_sid_dup(di.di_binsid);
126 account->a_rid = (uint32_t)-1;
128 if (!smb_account_validate(account)) {
129 smb_account_free(account);
173 account->a_name = strdup(name);
174 account->a_sid = sid;
175 account->a_domain = strdup(di.di_nbname);
176 account->a_domsid = smb_sid_split(sid, &account->a_rid);
177 account->a_type = type;
179 if (!smb_account_validate(account)) {
180 smb_account_free(account);
188 * Looks up the given SID in local account databases:
193 * If the account is found, its information is populated
200 * NT_STATUS_NOT_FOUND This is not a local account
201 * NT_STATUS_NONE_MAPPED It's a local account but cannot be
206 smb_sam_lookup_sid(smb_sid_t *sid, smb_account_t *account)
218 bzero(account, sizeof (smb_account_t));
225 account->a_type = SidTypeDomain;
226 account->a_name = strdup("");
227 account->a_domain = strdup(di.di_nbname);
228 account->a_sid = smb_sid_dup(sid);
229 account->a_domsid = smb_sid_dup(sid);
230 account->a_rid = (uint32_t)-1;
232 if (!smb_account_validate(account)) {
233 smb_account_free(account);
246 account->a_type = lwka->lwka_type;
247 account->a_name = strdup(lwka->lwka_name);
255 account->a_type = SidTypeUser;
259 account->a_name = strdup(smbpw.pw_name);
263 account->a_type = SidTypeAlias;
269 account->a_name = strdup(grp.sg_name);
279 account->a_domain = strdup(hostname);
280 account->a_sid = smb_sid_dup(sid);
281 account->a_domsid = smb_sid_split(sid, &account->a_rid);
283 if (!smb_account_validate(account)) {
284 smb_account_free(account);
405 * Frees memories allocated for the passed account fields.
408 smb_account_free(smb_account_t *account)
410 free(account->a_name);
411 free(account->a_domain);
412 smb_sid_free(account->a_sid);
413 smb_sid_free(account->a_domsid);
414 bzero(account, sizeof (smb_account_t));
418 * Validates the given account.
421 smb_account_validate(smb_account_t *account)
423 return ((account->a_name != NULL) && (account->a_sid != NULL) &&
424 (account->a_domain != NULL) && (account->a_domsid != NULL));
428 * Lookup local SMB user account database (/var/smb/smbpasswd)
458 * Lookup local SMB group account database (/var/smb/smbgroup.db)