summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-08-25 16:48:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-26 10:06:32 +1000
commita38a3b16e1b39985d8d9e084a1ca31e7e14d0198 (patch)
tree7a1412c4b47e5799b2e9be9f78c9fe8eff7cd0f4 /source3/passdb
parentb2068162f71d762fb862daa8f84cbfce64217161 (diff)
downloadsamba-a38a3b16e1b39985d8d9e084a1ca31e7e14d0198.tar.gz
samba-a38a3b16e1b39985d8d9e084a1ca31e7e14d0198.tar.bz2
samba-a38a3b16e1b39985d8d9e084a1ca31e7e14d0198.zip
s3-passdb: Convert lm_pw and nt_pw to python string using length
lm_pw and nt_pw are fixed length strings and convert them to python strings as fixed length strings. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/py_passdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index e23f47578e..cc59b64608 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -613,7 +613,7 @@ static PyObject *py_samu_get_lanman_passwd(PyObject *obj, void *closure)
Py_RETURN_NONE;
}
- py_lm_pw = PyString_FromString(lm_pw);
+ py_lm_pw = PyString_FromStringAndSize(lm_pw, LM_HASH_LEN);
return py_lm_pw;
}
@@ -639,7 +639,7 @@ static PyObject *py_samu_get_nt_passwd(PyObject *obj, void *closure)
Py_RETURN_NONE;
}
- py_nt_pw = PyString_FromString(nt_pw);
+ py_nt_pw = PyString_FromStringAndSize(nt_pw, NT_HASH_LEN);
return py_nt_pw;
}