char uid[10];
char *session;
const char *privilege;
- unsigned long pid = getpid();
- unsigned long tid = gettid();
+ pid_t pid = getpid();
+ pid_t tid = gettid();
if (pid == tid) {
fd = open("/proc/self/attr/current", O_RDONLY);
// Check current thread smack label.
char path[256] = { 0 };
pid = tid;
- snprintf(path, sizeof(path), "/proc/%lu/attr/current", tid);
+ snprintf(path, sizeof(path), "/proc/%d/attr/current", tid);
fd = open(path, O_RDONLY);
}
if (fd < 0) {