diff options
author | Sami Kerola <kerolasa@iki.fi> | 2012-02-29 15:58:51 +0100 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2012-03-18 14:28:04 +0100 |
commit | 6b79eb38ba46a7635a635623b91c2e3aa9326c7d (patch) | |
tree | b0e41bc4dd28196b6008329a5be83d7a976f1118 /include | |
parent | c900336d8b011278822dbc4e38ff9f6419f57ac2 (diff) | |
download | util-linux-6b79eb38ba46a7635a635623b91c2e3aa9326c7d.tar.gz |
lib: add fileutils function collection
The fileutils contains xmkstemp function will create temporary file
safe and reusable manner.
Reference: http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO.html#TEMPORARY-FILES
CC: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 5 | ||||
-rw-r--r-- | include/fileutils.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 4f5453f6..5e4e54ee 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -11,6 +11,7 @@ dist_noinst_HEADERS = \ crc32.h \ env.h \ exitcodes.h \ + fileutils.h \ fsprobe.h \ ismounted.h \ linux_reboot.h \ @@ -38,5 +39,5 @@ dist_noinst_HEADERS = \ wholedisk.h \ widechar.h \ writeall.h \ - xgetpass.h \ - xalloc.h + xalloc.h \ + xgetpass.h diff --git a/include/fileutils.h b/include/fileutils.h new file mode 100644 index 00000000..27b56619 --- /dev/null +++ b/include/fileutils.h @@ -0,0 +1,6 @@ +#ifndef UTIL_LINUX_FILEUTILS +#define UTIL_LINUX_FILEUTILS + +extern FILE * xmkstemp(char **tmpname); + +#endif |