openbsm: add audit_token_to_pid symbol

This is needed by some projects like Chromium that use openbsm/libbsm.

+26
+24
pkgs/development/libraries/openbsm/bsm-add-audit_token_to_pid.patch
···
··· 1 + Subject: Add audit_token_to_pid() 2 + 3 + Description: Apple provides audit_token_to_pid to get the pid of an 4 + audit token. Unfortunately, they have never released this to the 5 + OpenBSM project. 6 + 7 + diff -r -u -p1 a/bsm/libbsm.h b/bsm/libbsm.h 8 + --- a/bsm/libbsm.h 2009-04-15 16:45:54.000000000 -0500 9 + +++ b/bsm/libbsm.h 2018-05-11 04:11:14.063083147 -0500 10 + @@ -1298,1 +1298,2 @@ int audit_set_stat(au_stat_t *stats, siz 11 + int audit_send_trigger(int *trigger); 12 + +pid_t audit_token_to_pid(audit_token_t atoken); 13 + 14 + diff -r -u -p1 a/libbsm/bsm_wrappers.c b/libbsm/bsm_wrappers.c 15 + --- a/libbsm/bsm_wrappers.c 2009-04-15 16:46:06.000000000 -0500 16 + +++ b/libbsm/bsm_wrappers.c 2018-05-11 04:10:15.710820393 -0500 17 + @@ -823,1 +823,6 @@ audit_get_car(char *path, size_t sz) 18 + } 19 + + 20 + +pid_t audit_token_to_pid(audit_token_t atoken) 21 + +{ 22 + + return atoken.val[5]; 23 + +} 24 +
+2
pkgs/development/libraries/openbsm/default.nix
··· 12 sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1"; 13 }; 14 15 meta = { 16 homepage = http://www.openbsm.org/; 17 platforms = lib.platforms.unix;
··· 12 sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1"; 13 }; 14 15 + patches = [ ./bsm-add-audit_token_to_pid.patch ]; 16 + 17 meta = { 18 homepage = http://www.openbsm.org/; 19 platforms = lib.platforms.unix;