TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_logon_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_logoff_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_kickoff_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_bad_password_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_pass_last_set_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_pass_can_change_time(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
static int py_samu_set_pass_must_change_time(PyObject *obj, PyObject *value, void *closure)
{
TALLOC_CTX *frame = talloc_stackframe();
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
/* TODO: make this not a get/set or give a better exception */
talloc_free(frame);
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_acct_ctrl(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_logon_divs(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_hours_len(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
}
for (i=0; i < hours_len; i++) {
- PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value,i), return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, PyList_GET_ITEM(value,i), return -1;);
hours[i] = PyInt_AsLong(PyList_GET_ITEM(value, i));
}
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_bad_password_count(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_logon_count(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_country_code(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
struct samu *sam_acct = (struct samu *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
if (!pdb_set_code_page(sam_acct, PyInt_AsLong(value), PDB_CHANGED)) {
talloc_free(frame);
return -1;
TALLOC_CTX *frame = talloc_stackframe();
GROUP_MAP *group_map = (GROUP_MAP *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
group_map->gid = PyInt_AsLong(value);
talloc_free(frame);
return 0;
TALLOC_CTX *frame = talloc_stackframe();
GROUP_MAP *group_map = (GROUP_MAP *)pytalloc_get_ptr(obj);
- PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
+ PY_CHECK_TYPE(&PyLong_Type, value, return -1;);
group_map->sid_name_use = PyInt_AsLong(value);
talloc_free(frame);
return 0;