SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,29 @@
Index: base/password.py
--- base/password.py.orig
+++ base/password.py
@@ -272,7 +272,11 @@ class Password(object):
def __get_password_utils(self):
if self.__authType == "su":
- AuthType, AuthCmd = 'su', 'su -c "%s"'
+ # in this context, `-c' refers to the BSD login class
+ if sys.platform.startswith('openbsd'):
+ AuthType, AuthCmd = 'su', 'su root -c "%s"'
+ else:
+ AuthType, AuthCmd = 'su', 'su -c "%s"'
else:
AuthType, AuthCmd = 'sudo', 'sudo %s'
@@ -285,7 +289,11 @@ class Password(object):
if self.__authType == "sudo":
AuthType, AuthCmd = 'sudo', 'sudo %s'
else:
- AuthType, AuthCmd = 'su', 'su -c "%s"'
+ # in this context, `-c' refers to the BSD login class
+ if sys.platform.startswith('openbsd'):
+ AuthType, AuthCmd = 'su', 'su root -c "%s"'
+ else:
+ AuthType, AuthCmd = 'su', 'su -c "%s"'
'''
if utils.which('kdesu'):
AuthType, AuthCmd = 'kdesu', 'kdesu -- %s'