write_file(): Write a string into a file
| 38 | |
| 39 | // write_file(): Write a string into a file |
| 40 | void write_file(const char *filename, char *text) { |
| 41 | int fd = open(filename, O_RDWR); |
| 42 | write(fd, text, strlen(text)); |
| 43 | close(fd); |
| 44 | } |
| 45 | |
| 46 | // new_ns(): Change the current namespace to access to netfilter and to be able to write security xattr in a tmpfs |
| 47 | void new_ns(void) { |