repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Drop main() prototype. Syncs with NetBSD-8
[minix.git]
/
minix
/
tests
/
t60a.c
blob
7489555b8b667d971dc79330b223913ffb50e0fd
1
#include <unistd.h>
2
#include <stdlib.h>
3
#include <stdio.h>
4
5
int
main
(
int
argc
,
char
*
argv
[])
6
{
7
/* Return our tainted state to the parent */
8
int
newmode
;
9
char
cmd
[
30
];
10
11
if
(
argc
<
2
)
return
(-
2
);
12
if
((
newmode
=
atoi
(
argv
[
1
])) >
0
) {
13
snprintf
(
cmd
,
sizeof
(
cmd
),
"chmod %d %s"
,
newmode
,
argv
[
0
]);
14
system
(
cmd
);
15
}
16
17
return
(
issetugid
());
18
}