Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2f113506
Commit
2f113506
authored
Jul 10, 2012
by
Seth Vidal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify user module so that password is NEVER logged before the command runs
parent
238e4adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
library/user
+3
-1
No files found.
library/user
View file @
2f113506
...
...
@@ -22,6 +22,7 @@ try:
except
ImportError
:
import
simplejson
as
json
import
os
import
re
import
pwd
import
grp
import
shlex
...
...
@@ -265,7 +266,8 @@ argfile = sys.argv[1]
args
=
open
(
argfile
,
'r'
)
.
read
()
items
=
shlex
.
split
(
args
)
syslog
.
openlog
(
'ansible-
%
s'
%
os
.
path
.
basename
(
__file__
))
syslog
.
syslog
(
syslog
.
LOG_NOTICE
,
'Invoked with
%
s'
%
args
)
log_args
=
re
.
sub
(
r'password=.+ (.*)'
,
r"password=NOT_LOGGING_PASSWORD \1"
,
args
)
syslog
.
syslog
(
syslog
.
LOG_NOTICE
,
'Invoked with
%
s'
%
log_args
)
if
not
len
(
items
):
fail_json
(
msg
=
'the module requires arguments -a'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment