mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Fix printf warnings found on systems where time_t <> long int.
Jeremy.
This commit is contained in:
parent
2ca48d3740
commit
669f2a02e2
@ -1249,7 +1249,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_PROFILE_PATH),
|
||||
pdb_get_profile_path(sampass));
|
||||
|
||||
if (asprintf(&temp, "%li", pdb_get_logon_time(sampass)) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)pdb_get_logon_time(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (need_update(sampass, PDB_LOGONTIME))
|
||||
@ -1257,7 +1257,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_LOGON_TIME), temp);
|
||||
SAFE_FREE(temp);
|
||||
|
||||
if (asprintf(&temp, "%li", pdb_get_logoff_time(sampass)) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)pdb_get_logoff_time(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (need_update(sampass, PDB_LOGOFFTIME))
|
||||
@ -1265,7 +1265,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_LOGOFF_TIME), temp);
|
||||
SAFE_FREE(temp);
|
||||
|
||||
if (asprintf(&temp, "%li", pdb_get_kickoff_time(sampass)) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)pdb_get_kickoff_time(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (need_update(sampass, PDB_KICKOFFTIME))
|
||||
@ -1273,7 +1273,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_KICKOFF_TIME), temp);
|
||||
SAFE_FREE(temp);
|
||||
|
||||
if (asprintf(&temp, "%li", pdb_get_pass_can_change_time_noncalc(sampass)) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)pdb_get_pass_can_change_time_noncalc(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (need_update(sampass, PDB_CANCHANGETIME))
|
||||
@ -1281,7 +1281,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_PWD_CAN_CHANGE), temp);
|
||||
SAFE_FREE(temp);
|
||||
|
||||
if (asprintf(&temp, "%li", pdb_get_pass_must_change_time(sampass)) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)pdb_get_pass_must_change_time(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (need_update(sampass, PDB_MUSTCHANGETIME))
|
||||
@ -1361,7 +1361,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
|
||||
if (need_update(sampass, PDB_PASSLASTSET)) {
|
||||
if (asprintf(&temp, "%li",
|
||||
pdb_get_pass_last_set_time(sampass)) < 0) {
|
||||
(long int)pdb_get_pass_last_set_time(sampass)) < 0) {
|
||||
return false;
|
||||
}
|
||||
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, existing, mods,
|
||||
@ -1423,7 +1423,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
temp);
|
||||
SAFE_FREE(temp);
|
||||
|
||||
if (asprintf(&temp, "%li", badtime) < 0) {
|
||||
if (asprintf(&temp, "%li", (long int)badtime) < 0) {
|
||||
return false;
|
||||
}
|
||||
smbldap_make_mod(
|
||||
@ -5941,7 +5941,7 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
|
||||
smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaSID",
|
||||
sid_string_tos(sid));
|
||||
smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaPwdLastSet",
|
||||
talloc_asprintf(talloc_tos(), "%li", time(NULL)));
|
||||
talloc_asprintf(talloc_tos(), "%li", (long int)time(NULL)));
|
||||
smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
|
||||
"sambaClearTextPassword", pwd);
|
||||
|
||||
|
@ -168,7 +168,7 @@ static int lpq_command(int argc, char **argv)
|
||||
job_list[i].size,
|
||||
(i == 0 && job_list[i].status == LPQ_QUEUED) ?
|
||||
LPQ_SPOOLING : job_list[i].status,
|
||||
job_list[i].submit_time, job_list[i].owner,
|
||||
(long int)job_list[i].submit_time, job_list[i].owner,
|
||||
job_list[i].jobname);
|
||||
job_count++;
|
||||
}
|
||||
|
@ -487,7 +487,8 @@ static void clean_exit(void)
|
||||
{
|
||||
char bs[100];
|
||||
human_readable(total_bytes, bs, sizeof(bs));
|
||||
if(!quiet)fprintf(stderr, "Downloaded %s in %lu seconds\n", bs, time(NULL) - total_start_time);
|
||||
if(!quiet)fprintf(stderr, "Downloaded %s in %lu seconds\n", bs,
|
||||
(unsigned long)(time(NULL) - total_start_time));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user