From 580bc09d41ddc8542515f50d40ff8c8477711d3d Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 2 Oct 2016 20:41:26 +0000 Subject: Dh_Lib: Add a reset_perm_and_owner function Signed-off-by: Niels Thykier --- doc/PROGRAMMING | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/PROGRAMMING') diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 4d1e315b..eb063724 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -324,6 +324,16 @@ install_lib($src, $dest) Installs a library at the path $src into $dest. The parent dir of $dest must exist (can be created with install_dir). This is intended for installing libraries. +reset_perm_and_owner($mode, $path...) + Resets the ownership and mode (POSIX permissions) of $path + This is useful for files created directly by the script, but + it not necessary for files installed via the install_* + functions. + The file owner and group is set to "root:root". The change + is only done on the exact paths listed (i.e. it is *not* + recursive). + To avoid issue, please pass mode as a string (i.e. '0755' + rather than 0755). open_gz($file) Open $file, read from it as a gzip-compressed file and return the file handle. -- cgit v1.2.3