Lines Matching defs:entry
85 smb_audit_t *entry;
178 if ((entry = malloc(sizeof (smb_audit_t))) == NULL) {
185 entry->sa_handle = ah;
186 entry->sa_uid = uid;
187 entry->sa_gid = gid;
188 entry->sa_username = strdup(username);
189 entry->sa_domain = strdup(domain);
192 smbd_audit_link(entry);
193 token->tkn_audit_sid = entry->sa_audit_sid;
206 smb_audit_t *entry;
209 entry = smbd_audit_list;
211 while (entry) {
212 if (entry->sa_audit_sid == audit_sid) {
213 ++entry->sa_refcnt;
217 entry = entry->sa_next;
231 smb_audit_t *entry;
237 if ((entry = smbd_audit_unlink(audit_sid)) == NULL)
240 if (IDMAP_ID_IS_EPHEMERAL(entry->sa_uid)) {
241 smb_autohome_remove(entry->sa_username);
243 if (getpwuid_r(entry->sa_uid, &pw, buf, sizeof (buf)) == NULL)
249 ah = entry->sa_handle;
255 event->adt_smbd_logoff.domain = entry->sa_domain;
256 event->adt_smbd_logoff.username = entry->sa_username;
266 free(entry->sa_username);
267 free(entry->sa_domain);
268 free(entry);
275 smbd_audit_link(smb_audit_t *entry)
283 entry->sa_audit_sid = smbd_audit_sid;
284 entry->sa_refcnt = 1;
285 entry->sa_next = smbd_audit_list;
286 smbd_audit_list = entry;
292 * Unlink an audit handle. If the reference count reaches 0, the entry
293 * is removed from the list and returned. Otherwise the entry remains
299 smb_audit_t *entry;
306 entry = *ppe;
308 if (entry->sa_audit_sid == audit_sid) {
309 if (entry->sa_refcnt == 0)
312 if ((--entry->sa_refcnt) != 0)
315 *ppe = entry->sa_next;
317 return (entry);