Skip to content

Commit 485aed8

Browse files
committed
Addressed comments and fixed AUT build errors
1 parent f77490b commit 485aed8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/sonic-py-common/sonic_py_common/security_cipher.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
A common module for handling the encryption and
44
decryption of the feature passkey. It also takes
5-
care of storying the secure cipher at root
5+
care of storing the secure cipher at root
66
protected file system
77
88
'''
@@ -36,7 +36,6 @@ def __init__(self):
3636
with open(self._file_path, 'w') as file:
3737
file.writelines("#Auto generated file for storing the encryption passwords\n")
3838
file.writelines("TACPLUS : \nRADIUS : \nLDAP :\n")
39-
#os.chmod(self._file_path, 0o644)
4039
self._initialized = True
4140

4241
# Write cipher_pass file
@@ -52,10 +51,8 @@ def __write_passwd_file(self, feature_type, passwd):
5251
# Update the password for given feature
5352
lines[self._feature_list.index(feature_type)] = feature_type + ' : ' + passwd + '\n'
5453

55-
#os.chmod(self._file_path, 0o777)
5654
with open(self._file_path, 'w') as file:
5755
file.writelines(lines)
58-
#os.chmod(self._file_path, 0o644)
5956
except FileNotFoundError:
6057
syslog.syslog(syslog.LOG_ERR, "__write_passwd_file: File {} no found".format(self._file_path))
6158
except PermissionError:

src/sonic-py-common/tests/test_security_cipher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from sonic_py_common.secure_cipher import secure_cipher
1+
from sonic_py_common.security_cipher import security_cipher
22

33
temp = security_cipher()
44

0 commit comments

Comments
 (0)