Skip to content

Commit

Permalink
ldap: fix single file replace function
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpil2002 committed Mar 19, 2024
1 parent 8105f4d commit 9a95a54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,9 @@ class AaaCfg(object):

def modify_single_file_inplace(filename, operations=None):
if operations:
cmd = ["sed", '-i'] + operations + [filename]
cmd = "sed -i {0} {1}".format(' -i '.join(operations), filename)
syslog.syslog(syslog.LOG_DEBUG, "modify_single_file_inplace: cmd - {}".format(cmd))
subprocess.run(cmd)

run_cmd_output(cmd.split())

class PasswHardening(object):
def __init__(self):
Expand Down

0 comments on commit 9a95a54

Please sign in to comment.