- group = xmalloc(9);
- gid = my_getpwnamegid(user);
- my_getgrgid(group, gid);
- }
+#ifdef CONFIG_SELINUX
+ printf("uid=%ld(%s) gid=%ld(%s)", pwnam, user, grnam, group);
+ if(is_flask_enabled_flag)
+ {
+ security_id_t mysid = getsecsid();
+ char context[80];
+ int len = sizeof(context);
+ context[0] = '\0';
+ if(security_sid_to_context(mysid, context, &len))
+ strcpy(context, "unknown");
+ printf(" context=%s\n", context);
+ }
+ else
+ printf("\n");
+#else
+ printf("uid=%ld(%s) gid=%ld(%s)\n", pwnam, user, grnam, group);
+#endif