[type/__dma_auth] Fix off-by-one error
This commit is contained in:
parent
96fcccf529
commit
ca9e011d50
2 changed files with 6 additions and 3 deletions
|
@ -64,7 +64,7 @@ BEGIN {
|
|||
host = substr($0, length(login) + 2)
|
||||
|
||||
if (match(host, DP)) {
|
||||
passwd = substr(host, RSTART)
|
||||
passwd = substr(host, RSTART + 1)
|
||||
host = substr(host, 1, RSTART - 1)
|
||||
} else {
|
||||
passwd = ""
|
||||
|
|
|
@ -99,7 +99,10 @@ BEGIN {
|
|||
}
|
||||
|
||||
# skip comments and empty lines
|
||||
/^#/ || /^$/ { print; next }
|
||||
/^#/ || /^$/ {
|
||||
print
|
||||
next
|
||||
}
|
||||
|
||||
{
|
||||
# parse line
|
||||
|
@ -110,7 +113,7 @@ BEGIN {
|
|||
host = substr($0, length(login) + 2)
|
||||
|
||||
if (match(host, DP)) {
|
||||
passwd = substr(host, RSTART)
|
||||
passwd = substr(host, RSTART + 1)
|
||||
host = substr(host, 1, RSTART - 1)
|
||||
} else {
|
||||
passwd = ""
|
||||
|
|
Loading…
Reference in a new issue