X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=meta-stx%2Frecipes-devtools%2Fpython%2Ffiles%2Fpython-keyring%2Fno_keyring_password.patch;fp=meta-stx%2Frecipes-devtools%2Fpython%2Ffiles%2Fpython-keyring%2Fno_keyring_password.patch;h=0000000000000000000000000000000000000000;hb=e0634c6eaf2fe2641a0fb90e84a5defb880b1335;hp=798daec5670c98af138a4d412f6e6ec44d24d6ca;hpb=210d0f78485e760dffcdd3f630f59cec797f3f11;p=pti%2Frtp.git diff --git a/meta-stx/recipes-devtools/python/files/python-keyring/no_keyring_password.patch b/meta-stx/recipes-devtools/python/files/python-keyring/no_keyring_password.patch deleted file mode 100644 index 798daec..0000000 --- a/meta-stx/recipes-devtools/python/files/python-keyring/no_keyring_password.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/keyring/backends/file.py b/keyring/backends/file.py -index f899880..ef6db1d 100644 ---- a/keyring/backends/file.py -+++ b/keyring/backends/file.py -@@ -116,7 +116,7 @@ class BaseKeyring(FileBacked, KeyringBackend): - # create the file without group/world permissions - with open(self.file_path, 'w'): - pass -- user_read_write = 0o600 -+ user_read_write = 0o644 - os.chmod(self.file_path, user_read_write) - - def delete_password(self, service, username): -@@ -172,12 +172,19 @@ class Encrypted(object): - - def _get_new_password(self): - while True: -- password = getpass.getpass( -- "Please set a password for your new keyring: ") -- confirm = getpass.getpass('Please confirm the password: ') -- if password != confirm: -- sys.stderr.write("Error: Your passwords didn't match\n") -- continue -+#**************************************************************** -+# Forging the Keyring password to allow automation and still keep -+# the password encoded. TODO to be revisited when Barbican keyring -+# Will be used with the complete PKI solution -+#**************************************************************** -+# password = getpass.getpass( -+# "Please set a password for your new keyring: ") -+# confirm = getpass.getpass('Please confirm the password: ') -+# if password != confirm: -+# sys.stderr.write("Error: Your passwords didn't match\n") -+# continue -+ password = "Please set a password for your new keyring: " -+ - if '' == password.strip(): - # forbid the blank password - sys.stderr.write("Error: blank passwords aren't allowed.\n") -@@ -248,8 +255,15 @@ class EncryptedKeyring(Encrypted, BaseKeyring): - Unlock this keyring by getting the password for the keyring from the - user. - """ -- self.keyring_key = getpass.getpass( -- 'Please enter password for encrypted keyring: ') -+#**************************************************************** -+# Forging the Keyring password to allow automation and still keep -+# the password encoded. TODO to be revisited when Barbican keyring -+# Will be used with the complete PKI solution -+#**************************************************************** -+# self.keyring_key = getpass.getpass( -+# 'Please enter password for encrypted keyring: ') -+ self.keyring_key = "Please set a password for your new keyring: " -+ - try: - ref_pw = self.get_password('keyring-setting', 'password reference') - assert ref_pw == 'password reference value' -diff --git a/keyring/util/platform_.py b/keyring/util/platform_.py -index dcdffea..53b9eae 100644 ---- a/keyring/util/platform_.py -+++ b/keyring/util/platform_.py -@@ -19,7 +19,7 @@ def _data_root_Linux(): - Use freedesktop.org Base Dir Specfication to determine storage - location. - """ -- fallback = os.path.expanduser('~/.local/share') -+ fallback = os.path.expanduser('/opt/platform/.keyring/') - root = os.environ.get('XDG_DATA_HOME', None) or fallback - return os.path.join(root, 'python_keyring') -