summaryrefslogtreecommitdiffstats
path: root/redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
commitb4359e8bf97799f83dc1ca62744db7cfcc81bc87 (patch)
tree3346872613490cc467c19e1645d0026c1221bce7 /redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
parent4cc71d79c5718d59078d06c497a56d7c05b41576 (diff)
downloadtde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.tar.gz
tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.zip
RPM Packaging: rename directories
Diffstat (limited to 'redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch')
-rw-r--r--redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch b/redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
new file mode 100644
index 000000000..7f21fe176
--- /dev/null
+++ b/redhat/tdelibs/kdelibs-3.5.13-fix_ktempfile_special_bits.patch
@@ -0,0 +1,27 @@
+commit 9068fffdf82dc9cf60e83639b3a9b397761304cd
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+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);