diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-01-07 16:09:20 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-01-07 16:09:20 +0200 |
commit | 02824f0e9d9c818c46682c13502a7eab5a4ebb0b (patch) | |
tree | 5c738e3c273584e3fd47b3592cdc19ef45eaf99e /lib | |
parent | c80bd01564129d531107f9f8458fc7c07e64bba5 (diff) | |
download | rpm-02824f0e9d9c818c46682c13502a7eab5a4ebb0b.tar.gz rpm-02824f0e9d9c818c46682c13502a7eab5a4ebb0b.tar.bz2 rpm-02824f0e9d9c818c46682c13502a7eab5a4ebb0b.zip |
Set a default 0022 umask value always (#83006)
Patch derived from rpm5.org work of Jeff Johnson
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpmrc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 37d21e740..11ca6e488 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -1679,6 +1679,10 @@ static rpmRC rpmReadRC(const char * rcfiles) int rpmReadConfigFiles(const char * file, const char * target) { + mode_t mode = 0022; + /* Reset umask to its default umask(2) value. */ + mode = umask(mode); + /* Initialize crypto engine as early as possible */ if (rpmInitCrypto() < 0) { return -1; |