Skip to content

Commit 5d03ee9

Browse files
committed
Simplify authClient.py pam helper path.
There's really only one valid path, defined in the build.
1 parent ec41dda commit 5d03ee9

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/pamhelper/authClient.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,10 @@ def initialize(self):
4040

4141
try:
4242
helper_path = None
43-
architecture = platform.machine()
44-
paths = [config.libexecdir, "/usr/lib", "/usr/lib/cinnamon-screensaver", "/usr/libexec", "/usr/libexec/cinnamon-screensaver"]
45-
46-
# On x86 archs, iterate through multiple paths
47-
# For instance, on a Mint i686 box, the path is actually /usr/lib/i386-linux-gnu
48-
x86archs = ["i386", "i486", "i586", "i686"]
49-
if architecture in x86archs:
50-
for arch in x86archs:
51-
paths += ["/usr/lib/%s" % arch, "/usr/lib/%s-linux-gnu" % arch]
52-
elif architecture == "x86_64":
53-
paths += ["/usr/lib/x86_64", "/usr/lib/x86_64-linux-gnu", "/usr/lib64"]
54-
else:
55-
paths += ["/usr/lib/%s" % architecture, "/usr/lib/%s-linux-gnu" % architecture]
5643

57-
for path in paths:
58-
full_path = os.path.join(path, "cinnamon-screensaver-pam-helper")
59-
if os.path.exists(full_path):
60-
helper_path = full_path
61-
break
44+
full_path = os.path.join(config.pkglibdir, "cinnamon-screensaver-pam-helper")
45+
if os.path.exists(full_path):
46+
helper_path = full_path
6247

6348
if helper_path is None:
6449
print ("authClient: critical Error: PAM Helper could not be found!")

0 commit comments

Comments
 (0)