1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

more irix -64 portability fixes

(This used to be commit 65e857b36e)
This commit is contained in:
Andrew Tridgell
2001-12-31 14:05:22 +00:00
parent eb4e101153
commit 84ecd95dba
5 changed files with 9 additions and 18 deletions

View File

@ -71,34 +71,24 @@ static char *decode_account_policy_name(int field)
switch (field) { switch (field) {
case AP_MIN_PASSWORD_LEN: case AP_MIN_PASSWORD_LEN:
return "min password length"; return "min password length";
break;
case AP_PASSWORD_HISTORY: case AP_PASSWORD_HISTORY:
return "password history"; return "password history";
break;
case AP_USER_MUST_LOGON_TO_CHG_PASS: case AP_USER_MUST_LOGON_TO_CHG_PASS:
return "user must logon to change password"; return "user must logon to change password";
break;
case AP_MAX_PASSWORD_AGE: case AP_MAX_PASSWORD_AGE:
return "maximum password age"; return "maximum password age";
break;
case AP_MIN_PASSWORD_AGE: case AP_MIN_PASSWORD_AGE:
return "minimum password age"; return "minimum password age";
break;
case AP_LOCK_ACCOUNT_DURATION: case AP_LOCK_ACCOUNT_DURATION:
return "lockout duration"; return "lockout duration";
break;
case AP_RESET_COUNT_TIME: case AP_RESET_COUNT_TIME:
return "reset count minutes"; return "reset count minutes";
break;
case AP_BAD_ATTEMPT_LOCKOUT: case AP_BAD_ATTEMPT_LOCKOUT:
return "bad lockout attempt"; return "bad lockout attempt";
break;
case AP_TIME_TO_LOGOUT: case AP_TIME_TO_LOGOUT:
return "disconnect time"; return "disconnect time";
break;
default: default:
return "undefined value"; return "undefined value";
break;
} }
} }

View File

@ -213,7 +213,6 @@ convert:
break; break;
case E2BIG: case E2BIG:
goto convert; goto convert;
break;
case EILSEQ: case EILSEQ:
reason="Illegal myltibyte sequence"; reason="Illegal myltibyte sequence";
break; break;

View File

@ -790,12 +790,13 @@ BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type)
return False; return False;
if (get_group_map_from_sid(*psid, &map, MAPPING_WITHOUT_PRIV)) { if (get_group_map_from_sid(*psid, &map, MAPPING_WITHOUT_PRIV)) {
/* the SID is in the mapping table but not mapped */ /* the SID is in the mapping table but not mapped */
if (map.gid==-1) if (map.gid==-1)
return False; return False;
sid_peek_rid(&map.sid, pgid); sid_peek_rid(&map.sid, &rid);
*pgid = rid;
*name_type = map.sid_name_use; *name_type = map.sid_name_use;
} else { } else {
*pgid = pdb_group_rid_to_gid(rid); *pgid = pdb_group_rid_to_gid(rid);
@ -1765,7 +1766,7 @@ BOOL pdb_set_hours (SAM_ACCOUNT *sampass, const uint8 *hours)
BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass) BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass)
{ {
time_t expire; uint32 expire;
if (!sampass) if (!sampass)
return False; return False;
@ -1773,9 +1774,9 @@ BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass)
if (!pdb_set_pass_last_set_time (sampass, time(NULL))) if (!pdb_set_pass_last_set_time (sampass, time(NULL)))
return False; return False;
account_policy_get(AP_MAX_PASSWORD_AGE, (int *)&expire); account_policy_get(AP_MAX_PASSWORD_AGE, &expire);
if (expire==-1) { if (expire==(uint32)-1) {
if (!pdb_set_pass_must_change_time (sampass, 0)) if (!pdb_set_pass_must_change_time (sampass, 0))
return False; return False;
} else { } else {

View File

@ -744,7 +744,7 @@ BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
********************************************************************/ ********************************************************************/
void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, char *logon_srv, char *sess_key, char *acct_name, void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, char *logon_srv, char *sess_key, char *acct_name,
uint16 sec_chan, char *comp_name, DOM_CRED *cred, char hashed_mach_pwd[16]) uint16 sec_chan, char *comp_name, DOM_CRED *cred, uchar hashed_mach_pwd[16])
{ {
unsigned char nt_cypher[16]; unsigned char nt_cypher[16];

View File

@ -424,7 +424,8 @@ static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset)
} }
if (tailer != rec.rec_len + sizeof(rec)) { if (tailer != rec.rec_len + sizeof(rec)) {
printf("ERROR: tailer does not match record! tailer=%u totalsize=%u\n", tailer, rec.rec_len + sizeof(rec)); printf("ERROR: tailer does not match record! tailer=%u totalsize=%u\n",
(unsigned)tailer, (unsigned)(rec.rec_len + sizeof(rec)));
} }
return rec.next; return rec.next;
} }