1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

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>
This commit is contained in:
Amitay Isaacs
2011-08-25 16:48:40 +10:00
committed by Andrew Bartlett
parent b2068162f7
commit a38a3b16e1

View File

@ -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;
}