ãªã¹ãï¼ã®ãµã³ãã«ããã°ã©ã setuid_test.c ãã覧ããã ãããããsetuid_test.outãã¨ããååã®ãã¡ã¤ã«ãä½æï¼13è¡ç®ï¼ããã ãã®ç°¡åãªããã°ã©ã ã ã 1 #include <sys/types.h> 2 #include <sys/stat.h> 3 #include <fcntl.h> 4 #include <stdlib.h> 5 6 int main(void); 7 8 int main(void) 9 10 int fd; 11 12 /* create a file */ 13 fd = creat("setuid_test.out", 0644); 14 if(fd!=-1) close(fd); 15 } 1 $ gcc -o setuid_test setuid_test.c â ã³ã³ãã¤ã« 2 $ ls -l setuid_test 3 -
{{#tags}}- {{label}}
{{/tags}}