Now that levelFrom=user is finally officially into mainline. It might
make sense to finally document what they do a bit more thoroughly,
especially the code in android.c, its not obvious.
I could try to write this up, but I am not even 100% sure I understand
what your doing here:
switch (cur->levelFrom) {
case LEVELFROM_APP:
snprintf(level, sizeof level, "%s:c%u,c%u",
context_range_get(ctx), appid & 0xff,
256 + (appid>>8 & 0xff));
break;
case LEVELFROM_USER:
snprintf(level, sizeof level, "%s:c%u,c%u",
context_range_get(ctx),
512 + (userid & 0xff),
768 + (userid>>8 & 0xff));
break;
case LEVELFROM_ALL:
snprintf(level, sizeof level,
"%s:c%u,c%u,c%u,c%u",
context_range_get(ctx), appid & 0xff,
256 + (appid>>8 & 0xff),
512 + (userid & 0xff),
768 + (userid>>8 & 0xff));
break;
default:
goto err;
Are you just ensuring that each category is unique so their are no
duplicates? if the two bytes were both 0x4, you don't want s0:c4,c4,
instead you would get s0:c516,c772. Thats my understanding, but it may
be wrong.
--
Respectfully,
William C Roberts
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to
[email protected].