summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-26 08:02:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:19 -0500
commit39a236883ee4015980ff3d3cab8a8e5fec858502 (patch)
tree6d20f1364cf4f1dd0cc9e2237bfc9c96ce301186 /source4/rpc_server/samr
parent0eb7588cc4d1fa423430e61ccbef19ec2453e164 (diff)
downloadsamba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.gz
samba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.bz2
samba-39a236883ee4015980ff3d3cab8a8e5fec858502.zip
r904: - fixed account expiry testing in auth_sam
- added printf style format attribute checking to samdb varargs fns - fix nt_time_to_unix() for zero and -1 times (This used to be commit 41f9b144f9fe77e92f960bd11b1df397a63fd2d5)
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/samdb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c
index 9995f013ae..fd643c7bb0 100644
--- a/source4/rpc_server/samr/samdb.c
+++ b/source4/rpc_server/samr/samdb.c
@@ -136,7 +136,7 @@ int samdb_search(void *ctx,
const char *basedn,
struct ldb_message ***res,
const char * const *attrs,
- const char *format, ...)
+ const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
{
va_list ap;
int count;
@@ -193,7 +193,7 @@ const char *samdb_search_string(void *ctx,
TALLOC_CTX *mem_ctx,
const char *basedn,
const char *attr_name,
- const char *format, ...)
+ const char *format, ...) _PRINTF_ATTRIBUTE(5,6)
{
va_list ap;
const char *str;
@@ -214,7 +214,7 @@ uint_t samdb_search_uint(void *ctx,
uint_t default_value,
const char *basedn,
const char *attr_name,
- const char *format, ...)
+ const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
{
va_list ap;
int count;
@@ -240,7 +240,7 @@ int64_t samdb_search_int64(void *ctx,
int64_t default_value,
const char *basedn,
const char *attr_name,
- const char *format, ...)
+ const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
{
va_list ap;
int count;
@@ -267,7 +267,7 @@ int samdb_search_string_multiple(void *ctx,
const char *basedn,
const char ***strs,
const char *attr_name,
- const char *format, ...)
+ const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
{
va_list ap;
int count, i;
@@ -406,7 +406,7 @@ NTTIME samdb_result_allow_pwd_change(void *ctx, TALLOC_CTX *mem_ctx,
return 0;
}
- minPwdAge = samdb_search_int64(ctx, mem_ctx, 0, "minPwdAge", "dn=%s", domain_dn);
+ minPwdAge = samdb_search_int64(ctx, mem_ctx, 0, NULL, "minPwdAge", "dn=%s", domain_dn);
/* yes, this is a -= not a += as minPwdAge is stored as the negative
of the number of 100-nano-seconds */
@@ -429,9 +429,9 @@ NTTIME samdb_result_force_pwd_change(void *ctx, TALLOC_CTX *mem_ctx,
return 0;
}
- maxPwdAge = samdb_search_int64(ctx, mem_ctx, 0, "maxPwdAge", "dn=%s", domain_dn);
+ maxPwdAge = samdb_search_int64(ctx, mem_ctx, 0, NULL, "maxPwdAge", "dn=%s", domain_dn);
if (maxPwdAge == 0) {
- attr_time = 0;
+ return 0;
} else {
attr_time -= maxPwdAge;
}