mirror of
https://github.com/samba-team/samba.git
synced 2024-12-29 11:21:54 +03:00
Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
(This used to be commit 73730f6004
)
This commit is contained in:
parent
5380636c4e
commit
803100197b
@ -1404,41 +1404,6 @@ struct smb_passwd *ldap_getpw(void);
|
||||
BOOL ldap_allocaterid(uint32 *rid);
|
||||
struct smb_passdb_ops *ldap_initialise_password_db(void);
|
||||
|
||||
/*The following definitions come from passdb/mysqlpass.c */
|
||||
|
||||
int mysql_db_lock_connect( MYSQL *handle );
|
||||
void *mysql_startpwent( BOOL update );
|
||||
void mysql_endpwent( void *ptr );
|
||||
SMB_BIG_UINT mysql_getpwpos(void *vp);
|
||||
BOOL mysql_setpwpos(void *vp, SMB_BIG_UINT pos);
|
||||
void *mysql_fill_smb_passwd( MYSQL_ROW *row );
|
||||
struct smb_passwd *mysql_getsmbpwent(void *vp);
|
||||
void *mysql_fetch_passwd( void *(*filler)(MYSQL_ROW*), char *where );
|
||||
void *mysql_getpwuid(void *(*filler)(MYSQL_ROW *), uid_t uid);
|
||||
struct smb_passwd *mysql_getsmbpwuid(uid_t uid);
|
||||
void *mysql_getpwnam(void *(*filler)(MYSQL_ROW *), char *field, const char *name);
|
||||
struct smb_passwd *mysql_getsmbpwnam(const char *unix_name);
|
||||
BOOL mysql_del_smb( MYSQL *handle, char *unix_name );
|
||||
BOOL mysql_add_smb( MYSQL *handle, struct smb_passwd *smb );
|
||||
BOOL mysql_mod_smb( MYSQL *handle, struct smb_passwd *smb, BOOL override );
|
||||
BOOL mysql_add_smbpwd_entry(struct smb_passwd *smb);
|
||||
BOOL mysql_mod_smbpwd_entry(struct smb_passwd *smb, BOOL override);
|
||||
struct smb_passdb_ops *mysql_initialise_password_db(void);
|
||||
|
||||
/*The following definitions come from passdb/mysqlsampass.c */
|
||||
|
||||
void *mysql_fill_sam_passwd( MYSQL_ROW *row );
|
||||
struct sam_passwd *mysql_getsampwent(void *vp);
|
||||
struct sam_passwd *mysql_getsampwrid(uint32 rid);
|
||||
struct sam_passwd *mysql_getsampwuid(uid_t uid);
|
||||
struct sam_passwd *mysql_getsampwntnam(const char *nt_name);
|
||||
struct sam_disp_info *mysql_getsamdispntnam(const char *nt_name);
|
||||
struct sam_disp_info *mysql_getsamdisprid(uint32 rid);
|
||||
struct sam_disp_info *mysql_getsamdispent(void *vp);
|
||||
BOOL mysql_add_sampwd_entry(struct sam_passwd *sam);
|
||||
BOOL mysql_mod_sampwd_entry(struct sam_passwd *sam, BOOL override);
|
||||
struct sam_passdb_ops *mysql_initialise_sam_password_db(void);
|
||||
|
||||
/*The following definitions come from passdb/nispass.c */
|
||||
|
||||
struct passdb_ops *nisplus_initialise_password_db(void);
|
||||
@ -1961,7 +1926,7 @@ void make_buffer3_str(BUFFER3 *str, char *buf, int len);
|
||||
void make_buffer3_hex(BUFFER3 *str, char *buf);
|
||||
void make_buffer3_bytes(BUFFER3 *str, uint8 *buf, int len);
|
||||
void smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth);
|
||||
void make_buffer2(BUFFER2 *str, uint8 *buf, int len);
|
||||
void make_buffer2(BUFFER2 *str, const char *buf, int len);
|
||||
void smb_io_buffer2(char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth);
|
||||
void make_buf_unistr2(UNISTR2 *str, uint32 *ptr, char *buf);
|
||||
void copy_unistr2(UNISTR2 *str, UNISTR2 *from);
|
||||
|
@ -458,19 +458,17 @@ void smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth)
|
||||
/*******************************************************************
|
||||
creates a BUFFER2 structure.
|
||||
********************************************************************/
|
||||
void make_buffer2(BUFFER2 *str, uint8 *buf, int len)
|
||||
void make_buffer2(BUFFER2 *str, const char *buf, int len)
|
||||
{
|
||||
ZERO_STRUCTP(str);
|
||||
|
||||
/* max buffer size (allocated size) */
|
||||
/* set up string lengths. */
|
||||
str->buf_max_len = len;
|
||||
str->undoc = 0;
|
||||
str->buf_len = buf != NULL ? len : 0;
|
||||
str->buf_len = len;
|
||||
|
||||
if (buf != NULL)
|
||||
{
|
||||
memcpy(str->buffer, buf, MIN(str->buf_len, sizeof(str->buffer)));
|
||||
}
|
||||
/* store the string (wide chars) */
|
||||
ascii_to_unistr(str->buffer, buf, len);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -761,16 +761,17 @@ void make_reg_r_info(REG_R_INFO *r_r,
|
||||
uint32 level, char *os_type,
|
||||
uint32 status)
|
||||
{
|
||||
char buf[512];
|
||||
int len;
|
||||
|
||||
len = ascii_to_unibuf(buf, os_type, sizeof(buf)-2) - buf;
|
||||
if (r_r == NULL || os_type == NULL) return;
|
||||
|
||||
len = strlen(os_type) * 2;
|
||||
|
||||
r_r->ptr1 = 1;
|
||||
r_r->level = level;
|
||||
|
||||
r_r->ptr_type = 1;
|
||||
make_buffer2(&(r_r->uni_type), buf, len);
|
||||
make_buffer2(&(r_r->uni_type), os_type, len);
|
||||
|
||||
r_r->ptr2 = 1;
|
||||
r_r->unknown_0 = len;
|
||||
|
Loading…
Reference in New Issue
Block a user