repo.or.cz
/
Samba.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
VERSION: Disable GIT_SNAPSHOT for the 4.16.0 release.
[Samba.git]
/
selftest
/
checkpassword_arg1.sh
blob
42e1b5e7df5a88ce5a6330ab117c55d1fd6576b9
1
#!/bin/sh
2
#
3
4
set -e
5
set -u
6
7
ACCOUNT_NAME
=
"
${SAMBA_CPS_ACCOUNT_NAME}
"
8
INVALIDPW
=
"
$1
"
9
NEWPW
=
`cat -`
10
11
echo -n
"
${NEWPW}
"
|
grep
-q
"^
${INVALIDPW}
\$"
&& {
12
echo
"Found invalid password"
>&
1
13
exit
1
14
}
15
16
echo -n
"
${NEWPW}
"
|
grep
-q
"^
${ACCOUNT_NAME}
\$"
&& {
17
echo
"Password includes ACCOUNT_NAME"
>&
1
18
exit
1
19
}
20
21
exit
0