summaryrefslogtreecommitdiffstats
path: root/redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
diff options
context:
space:
mode:
authorFrancois Andriot <[email protected]>2012-06-23 10:25:54 +0200
committerFrancois Andriot <[email protected]>2012-06-23 10:25:54 +0200
commitc5be5e13a14ad51c59c496d407c7d7c8e7fd8540 (patch)
tree40a256e66579ffd00df756fc091249234ff66aec /redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
parentd5d98e581ca554dba936ea8405d1ecf5fe8931c4 (diff)
downloadtde-packaging-c5be5e13a14ad51c59c496d407c7d7c8e7fd8540.tar.gz
tde-packaging-c5be5e13a14ad51c59c496d407c7d7c8e7fd8540.zip
RHEL/Fedora: updates kdelibs
Diffstat (limited to 'redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch')
-rw-r--r--redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch b/redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
new file mode 100644
index 000000000..7f21fe176
--- /dev/null
+++ b/redhat/kdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
@@ -0,0 +1,27 @@
+commit 9068fffdf82dc9cf60e83639b3a9b397761304cd
+Author: Timothy Pearson <[email protected]>
+Date: 1338002515 -0500
+
+ Fix KTempFile not obeying special bits on file creation
+ This closes Bug 349
+ Add modem category to TDE hardware manager
+
+diff --git a/tdecore/ktempfile.cpp b/tdecore/ktempfile.cpp
+index 2c7b56e..4632f00 100644
+--- a/kdecore/ktempfile.cpp
++++ b/kdecore/ktempfile.cpp
+@@ -117,8 +117,12 @@ KTempFile::create(const TQString &filePrefix, const TQString &fileExtension,
+ // Success!
+ bOpen = true;
+
+- // Set uid/gid (necessary for SUID programs)
+- fchown(mFd, getuid(), getgid());
++ uid_t uid = getuid();
++ uid_t euid = geteuid();
++ if (uid != euid) {
++ // Set uid/gid (necessary for SUID programs)
++ fchown(mFd, getuid(), getgid());
++ }
+
+ // Set close on exec
+ fcntl(mFd, F_SETFD, FD_CLOEXEC);