diff options
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index d0e5bf2a5..f6e63a85d 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -157,6 +157,19 @@ setMouseLive(display, type, emulate3buttons) print ' int +is_secure_file(filename) + char * filename + CODE: + { + int fd; + unlink(filename); /* in case it exists and we manage to remove it */ + RETVAL = (fd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600)) != -1; + if (RETVAL) close(fd); + } + OUTPUT: + RETVAL + +int is_ext3(device_name) char * device_name CODE: |