30 lines
1.1 KiB
Text
30 lines
1.1 KiB
Text
|
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'
|