/*
- * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
#include "tests.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
#include <sys/syscall.h>
-int
-main(void)
-{
#if defined(__NR_getuid) \
&& defined(__NR_setuid) \
&& defined(__NR_getresuid) \
&& __NR_fchown != __NR_fchown32 \
&& __NR_getgroups != __NR_getgroups32 \
/**/
+
+# include <assert.h>
+# include <stdlib.h>
+# include <unistd.h>
+# include <fcntl.h>
+
+int
+main(void)
+{
int uid;
int size;
int *list = 0;
buf[n] = '\0';
n = atoi(buf);
if (uid == n)
- return 77;
+ error_msg_and_skip("getuid() == overflowuid");
}
close(0);
}
assert(list = calloc(size + 1, sizeof(*list)));
assert(syscall(__NR_getgroups, size, list) == size);
return 0;
+}
+
#else
- return 77;
+
+SKIP_MAIN_UNDEFINED("__NR_getuid && __NR_setuid && __NR_getresuid"
+ " && __NR_setreuid && __NR_setresuid"
+ " && __NR_fchown && __NR_getgroups"
+ " && __NR_getuid32 && __NR_setuid32 && __NR_getresuid32"
+ " && __NR_setreuid32 && __NR_setresuid32"
+ " && __NR_fchown32 && __NR_getgroups32")
+
#endif
-}