1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-24 04:23:53 +03:00

clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'

messages.
nttrans.c: More updates.
smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke
       to use a new structure.
web/swat.c: Fixed gcc complaints about shadowing global 'string'.
Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 6dde50738f
commit 61c1dbb978
4 changed files with 35 additions and 48 deletions

View File

@@ -142,6 +142,8 @@ static void unfixtarname(char *tptr, char *fp, int l);
* tar specific utitlities * tar specific utitlities
*/ */
#if 0 /* Removed to get around gcc 'defined but not used' error. */
/* /*
* Stack routines, push_dir, pop_dir, top_dir_name * Stack routines, push_dir, pop_dir, top_dir_name
*/ */
@@ -186,6 +188,8 @@ static BOOL sub_dir(char *dir1, char *dir2)
} }
#endif /* Removed to get around gcc 'defined but not used' error. */
/* Create a string of size size+1 (for the null) */ /* Create a string of size size+1 (for the null) */
static char * string_create_s(int size) static char * string_create_s(int size)
{ {
@@ -1477,6 +1481,8 @@ static void unfixtarname(char *tptr, char *fp, int l)
} }
} }
#if 0 /* Removed to get around gcc 'defined but not used' error. */
/**************************************************************************** /****************************************************************************
Move to the next block in the buffer, which may mean read in another set of Move to the next block in the buffer, which may mean read in another set of
blocks. blocks.
@@ -1664,6 +1670,7 @@ static void do_tarput2(void)
} }
#endif /* Removed to get around gcc 'defined but not used' error. */
static void do_tarput() static void do_tarput()
{ {

View File

@@ -272,45 +272,14 @@ typedef struct nttime_info
#define ACB_PWNOEXP 0x0200 /* 1 = User password does not expire */ #define ACB_PWNOEXP 0x0200 /* 1 = User password does not expire */
#define ACB_AUTOLOCK 0x0400 /* 1 = Account auto locked */ #define ACB_AUTOLOCK 0x0400 /* 1 = Account auto locked */
#define MAX_HOURS_LEN 32
struct smb_passwd struct smb_passwd
{ {
time_t logon_time; /* logon time */ char *smb_name; /* username */
time_t logoff_time; /* logoff time */ int smb_userid; /* this is actually the unix uid_t */
time_t kickoff_time; /* kickoff time */ unsigned char *smb_passwd; /* Null if no password */
time_t pass_last_set_time; /* password last set time */ unsigned char *smb_nt_passwd; /* Null if no password */
time_t pass_can_change_time; /* password can change time */ uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
time_t pass_must_change_time; /* password must change time */ time_t pass_last_set_time; /* password last set time */
char *smb_name; /* username unicode string */
char *full_name; /* user's full name unicode string */
char *home_dir; /* home directory unicode string */
char *dir_drive; /* home directory drive unicode string */
char *logon_script; /* logon script unicode string */
char *profile_path; /* profile path unicode string */
char *acct_desc ; /* user description unicode string */
char *workstations; /* login from workstations unicode string */
char *unknown_str ; /* don't know what this is, yet. */
char *munged_dial ; /* munged path name and dial-back tel number */
int smb_userid; /* this is actually the unix uid_t */
int smb_grpid; /* this is actually the unix gid_t */
uint32 user_rid; /* Primary User ID */
uint32 group_rid; /* Primary Group ID */
unsigned char *smb_passwd; /* Null if no password */
unsigned char *smb_nt_passwd; /* Null if no password */
uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
uint32 unknown_3; /* 0x00ff ffff */
uint16 logon_divs; /* 168 - number of hours in a week */
uint32 hours_len; /* normally 21 bytes */
uint8 hours[MAX_HOURS_LEN];
uint32 unknown_5; /* 0x0002 0000 */
uint32 unknown_6; /* 0x0000 04ec */
}; };
@@ -324,7 +293,6 @@ typedef struct chal_info
typedef struct time_info typedef struct time_info
{ {
uint32 time; uint32 time;
} UTIME; } UTIME;
/* DOM_CREDs - timestamped client or server credentials */ /* DOM_CREDs - timestamped client or server credentials */
@@ -332,7 +300,6 @@ typedef struct cred_info
{ {
DOM_CHAL challenge; /* credentials */ DOM_CHAL challenge; /* credentials */
UTIME timestamp; /* credential time-stamp */ UTIME timestamp; /* credential time-stamp */
} DOM_CRED; } DOM_CRED;
struct cli_state { struct cli_state {

View File

@@ -30,6 +30,20 @@ extern int oplock_sock;
extern int smb_read_error; extern int smb_read_error;
extern int global_oplock_break; extern int global_oplock_break;
static char *known_nt_pipes[] = {
"\\LANMAN",
"\\srvsvc",
"\\samr",
"\\wkssvc",
"\\NETLOGON",
"\\ntlsa",
"\\ntsvcs",
"\\lsass",
"\\lsarpc",
NULL
};
/**************************************************************************** /****************************************************************************
reply to an unsolicited SMBNTtranss - just ignore it! reply to an unsolicited SMBNTtranss - just ignore it!
****************************************************************************/ ****************************************************************************/
@@ -166,9 +180,8 @@ due to being in oplock break state.\n", timestring() ));
SSVAL(outbuf,smb_flg2,flg2 | 0x40); /* IS_LONG_NAME */ SSVAL(outbuf,smb_flg2,flg2 | 0x40); /* IS_LONG_NAME */
} }
/* Now we must call the relevant TRANS2 function */ /* Now we must call the relevant NT_TRANS function */
switch(function_code) switch(function_code) {
{
case NT_TRANSACT_CREATE: case NT_TRANSACT_CREATE:
outsize = call_nt_transact_create(inbuf, outbuf, bufsize, cnum, outsize = call_nt_transact_create(inbuf, outbuf, bufsize, cnum,
&setup, &params, &data); &setup, &params, &data);
@@ -204,7 +217,7 @@ due to being in oplock break state.\n", timestring() ));
if(data) if(data)
free(data); free(data);
return (ERROR(ERRSRV,ERRerror)); return (ERROR(ERRSRV,ERRerror));
} }
/* As we do not know how many data packets will need to be /* As we do not know how many data packets will need to be
returned here the various call_nt_transact_xxxx calls returned here the various call_nt_transact_xxxx calls

View File

@@ -48,16 +48,16 @@ int i;
return(i); return(i);
} }
static char *fix_backslash(char *string) static char *fix_backslash(char *str)
{ {
static char newstring[1024]; static char newstring[1024];
char *p = newstring; char *p = newstring;
*p = '\0'; *p = '\0';
while (*string) { while (*str) {
if (*string == '\\') {*p++ = '\\';*p++ = '\\';} if (*str == '\\') {*p++ = '\\';*p++ = '\\';}
else *p++ = *string; else *p++ = *str;
++string; ++str;
*p = '\0'; *p = '\0';
} }
return newstring; return newstring;