Mageia Bugzilla – Attachment 5910 Details for
Bug 15266
Please update hplip package to recognize new HP printers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
hplip-3.14.6-no-world-writable-user-config.patch
hplip-3.14.6-no-world-writable-user-config.patch (text/plain), 808 bytes, created by
Vincent D
on 2015-02-13 22:20:06 CET
(
hide
)
Description:
hplip-3.14.6-no-world-writable-user-config.patch
Filename:
MIME Type:
Creator:
Vincent D
Created:
2015-02-13 22:20:06 CET
Size:
808 bytes
patch
obsolete
>diff -up hplip-3.15.2/base/os_utils.py.umask hplip-3.15.2/base/os_utils.py >--- hplip-3.15.2/base/os_utils.py.umask 2015-01-29 13:20:35.000000000 +0200 >+++ hplip-3.15.2/base/os_utils.py 2015-02-11 11:26:11.000000000 +0100 >@@ -52,14 +52,15 @@ def getHPLIPDir(): > hplipdir = os.path.join(homedir, ".hplip") > status = 0 > if not os.path.exists(hplipdir): >+ old_umask = os.umask(0) > try: >- os.umask(0) > s = os.stat(homedir) > os.mkdir(hplipdir, 0o755) > os.chown(hplipdir, s[stat.ST_UID], s[stat.ST_GID]) > except OSError: > status = 1 > log.error("Failed to create %s" % hplipdir) >+ os.umask(old_umask) > return status, hplipdir > def changeOwner(path, user, group, Recursive = False ): > status = 0
diff -up hplip-3.15.2/base/os_utils.py.umask hplip-3.15.2/base/os_utils.py --- hplip-3.15.2/base/os_utils.py.umask 2015-01-29 13:20:35.000000000 +0200 +++ hplip-3.15.2/base/os_utils.py 2015-02-11 11:26:11.000000000 +0100 @@ -52,14 +52,15 @@ def getHPLIPDir(): hplipdir = os.path.join(homedir, ".hplip") status = 0 if not os.path.exists(hplipdir): + old_umask = os.umask(0) try: - os.umask(0) s = os.stat(homedir) os.mkdir(hplipdir, 0o755) os.chown(hplipdir, s[stat.ST_UID], s[stat.ST_GID]) except OSError: status = 1 log.error("Failed to create %s" % hplipdir) + os.umask(old_umask) return status, hplipdir def changeOwner(path, user, group, Recursive = False ): status = 0
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15266
:
5909
| 5910 |
5911
|
5912
|
6704
|
6705
|
6895
|
6896
|
6897