Having issues calling kauth_cred_getgroups() as non-root cred_t from BigSur. Get panic:
I see nothing suspicious with the arguments either:
Works every time if I am root, but will panic as non-root. Stack having NULL is also odd. Runs on Catalina and before.
Code Block 0xffffffa843a737b0 : 0x0 0xffffffa843a738e0 : 0xffffff7fa5ab889e net.lundman.zfs : _dsl_load_user_sets + 0xbe -> 126 ret = kauth_cred_getgroups((kauth_cred_t)cr, gids, &count);
I see nothing suspicious with the arguments either:
Code Block (lldb) p *cr (cred_t) $4 = { cr_link = { le_next = 0xffffff868f0ac370 le_prev = 0xffffff80056582d0 } cr_ref = 52 cr_posix = { cr_uid = 501 cr_ruid = 501 cr_svuid = 501 cr_ngroups = 16 cr_groups = { [0] = 20 [1] = 12 [2] = 61 [3] = 79 [4] = 80 [5] = 81 [6] = 98 [7] = 701 [8] = 33 [9] = 100 [10] = 204 [11] = 250 [12] = 395 [13] = 398 [14] = 399 [15] = 400 } cr_rgid = 20 cr_svgid = 20 cr_gmuid = 501 cr_flags = 2 } cr_label = 0xffffff868fdb41c0 cr_audit = { as_aia_p = 0xffffff934aef0a18 as_mask = (am_success = 12288, am_failure = 12288) } } (lldb) p gids (gid_t [16]) $1 = { [0] = 0 [1] = 0 [2] = 0 [3] = 0 [4] = 0 [5] = 0 [6] = 0 [7] = 0 [8] = 0 [9] = 0 [10] = 0 [11] = 0 [12] = 0 [13] = 0 [14] = 0 [15] = 0 } (lldb) p count (int) $2 = 16
Works every time if I am root, but will panic as non-root. Stack having NULL is also odd. Runs on Catalina and before.