33c33
< * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#91
---
> * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#93
37c37
< __FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm_token.c 191270 2009-04-19 14:53:17Z rwatson $");
---
> __FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm_token.c 195740 2009-07-17 14:02:20Z rwatson $");
933c933
< * path 104 bytes
---
> * path (up to) 104 bytes + NULL (NULL terminated string)
1190a1191
> auditinfo_addr_t aia;
1192,1193c1193,1208
< if (getaudit(&auinfo) != 0)
< return (NULL);
---
> /*
> * Try to use getaudit_addr(2) first. If this kernel does not support
> * it, then fall back on to getaudit(2).
> */
> if (getaudit_addr(&aia, sizeof(aia)) != 0) {
> if (errno == ENOSYS) {
> if (getaudit(&auinfo) != 0)
> return (NULL);
> return (au_to_subject32(auinfo.ai_auid, geteuid(),
> getegid(), getuid(), getgid(), getpid(),
> auinfo.ai_asid, &auinfo.ai_termid));
> } else {
> /* getaudit_addr(2) failed for some other reason. */
> return (NULL);
> }
> }
1195,1196c1210,1211
< return (au_to_subject32(auinfo.ai_auid, geteuid(), getegid(),
< getuid(), getgid(), getpid(), auinfo.ai_asid, &auinfo.ai_termid));
---
> return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(),
> getgid(), getpid(), aia.ai_asid, &aia.ai_termid));
< * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#91
---
> * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#93
37c37
< __FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm_token.c 191270 2009-04-19 14:53:17Z rwatson $");
---
> __FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm_token.c 195740 2009-07-17 14:02:20Z rwatson $");
933c933
< * path 104 bytes
---
> * path (up to) 104 bytes + NULL (NULL terminated string)
1190a1191
> auditinfo_addr_t aia;
1192,1193c1193,1208
< if (getaudit(&auinfo) != 0)
< return (NULL);
---
> /*
> * Try to use getaudit_addr(2) first. If this kernel does not support
> * it, then fall back on to getaudit(2).
> */
> if (getaudit_addr(&aia, sizeof(aia)) != 0) {
> if (errno == ENOSYS) {
> if (getaudit(&auinfo) != 0)
> return (NULL);
> return (au_to_subject32(auinfo.ai_auid, geteuid(),
> getegid(), getuid(), getgid(), getpid(),
> auinfo.ai_asid, &auinfo.ai_termid));
> } else {
> /* getaudit_addr(2) failed for some other reason. */
> return (NULL);
> }
> }
1195,1196c1210,1211
< return (au_to_subject32(auinfo.ai_auid, geteuid(), getegid(),
< getuid(), getgid(), getpid(), auinfo.ai_asid, &auinfo.ai_termid));
---
> return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(),
> getgid(), getpid(), aia.ai_asid, &aia.ai_termid));