aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-12-09 11:28:44 +0100
committerVG <vg@devys.org>2016-12-09 11:28:44 +0100
commit55dbce5e34e8d1c4047f6c8369cb05715495a296 (patch)
tree76b99072f6fc95601a4b914e0c65a6ae330c4bae
parenta67983a2b100c811cbecd8cdef71277ce4549889 (diff)
downloadclip-55dbce5e34e8d1c4047f6c8369cb05715495a296.tar.gz
clip-55dbce5e34e8d1c4047f6c8369cb05715495a296.tar.bz2
clip-55dbce5e34e8d1c4047f6c8369cb05715495a296.zip
securise file creation rights with umask
-rwxr-xr-xclip1
1 files changed, 1 insertions, 0 deletions
diff --git a/clip b/clip
index 75d4d92..6e480b4 100755
--- a/clip
+++ b/clip
@@ -54,6 +54,7 @@ def secure_open(path, mode='r', *l, **kw):
if __name__ == '__main__':
+ os.umask(0o077)
clipboard_filepath = '/dev/shm/%s-clipboard' % getpass.getuser()
if(sys.stdin.isatty()):
# Should write clipboard contents out to stdout