mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Writable string const fixes.
Jeremy.
This commit is contained in:
parent
75b36459ab
commit
c832e95c2f
@ -1263,7 +1263,7 @@ BOOL get_dc_list(const char *domain, struct in_addr **ip_list, int *count, int *
|
|||||||
/* If it's our domain then use the 'password server' parameter. */
|
/* If it's our domain then use the 'password server' parameter. */
|
||||||
|
|
||||||
if (strequal(domain, lp_workgroup())) {
|
if (strequal(domain, lp_workgroup())) {
|
||||||
char *p;
|
const char *p;
|
||||||
char *pserver = lp_passwordserver(); /* UNIX charset. */
|
char *pserver = lp_passwordserver(); /* UNIX charset. */
|
||||||
fstring name;
|
fstring name;
|
||||||
int num_addresses = 0;
|
int num_addresses = 0;
|
||||||
|
@ -1075,6 +1075,7 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
|
|||||||
NTSTATUS nt_status;
|
NTSTATUS nt_status;
|
||||||
pstring driverpath;
|
pstring driverpath;
|
||||||
DATA_BLOB null_pw;
|
DATA_BLOB null_pw;
|
||||||
|
fstring res_type;
|
||||||
files_struct *fsp = NULL;
|
files_struct *fsp = NULL;
|
||||||
BOOL bad_path;
|
BOOL bad_path;
|
||||||
SMB_STRUCT_STAT st;
|
SMB_STRUCT_STAT st;
|
||||||
@ -1098,8 +1099,9 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
|
|||||||
|
|
||||||
/* Null password is ok - we are already an authenticated user... */
|
/* Null password is ok - we are already an authenticated user... */
|
||||||
null_pw = data_blob(NULL, 0);
|
null_pw = data_blob(NULL, 0);
|
||||||
|
fstrcpy(res_type, "A:");
|
||||||
become_root();
|
become_root();
|
||||||
conn = make_connection_with_chdir("print$", null_pw, "A:", user->vuid, &nt_status);
|
conn = make_connection_with_chdir("print$", null_pw, res_type, user->vuid, &nt_status);
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
|
|
||||||
if (conn == NULL) {
|
if (conn == NULL) {
|
||||||
@ -1389,6 +1391,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
|
|||||||
NTSTATUS nt_status;
|
NTSTATUS nt_status;
|
||||||
pstring inbuf;
|
pstring inbuf;
|
||||||
pstring outbuf;
|
pstring outbuf;
|
||||||
|
fstring res_type;
|
||||||
int ver = 0;
|
int ver = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1413,9 +1416,10 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
|
|||||||
* Note we must be root to do this.
|
* Note we must be root to do this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
become_root();
|
|
||||||
null_pw = data_blob(NULL, 0);
|
null_pw = data_blob(NULL, 0);
|
||||||
conn = make_connection_with_chdir("print$", null_pw, "A:", user->vuid, &nt_status);
|
fstrcpy(res_type, "A:");
|
||||||
|
become_root();
|
||||||
|
conn = make_connection_with_chdir("print$", null_pw, res_type, user->vuid, &nt_status);
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
|
|
||||||
if (conn == NULL) {
|
if (conn == NULL) {
|
||||||
@ -4308,6 +4312,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
|
|||||||
connection_struct *conn;
|
connection_struct *conn;
|
||||||
DATA_BLOB null_pw;
|
DATA_BLOB null_pw;
|
||||||
NTSTATUS nt_status;
|
NTSTATUS nt_status;
|
||||||
|
fstring res_type;
|
||||||
|
|
||||||
if ( !info_3 )
|
if ( !info_3 )
|
||||||
return False;
|
return False;
|
||||||
@ -4320,9 +4325,10 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
|
|||||||
* do this.
|
* do this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
become_root();
|
|
||||||
null_pw = data_blob( NULL, 0 );
|
null_pw = data_blob( NULL, 0 );
|
||||||
conn = make_connection_with_chdir( "print$", null_pw, "A:", user->vuid, &nt_status );
|
fstrcpy(res_type, "A:");
|
||||||
|
become_root();
|
||||||
|
conn = make_connection_with_chdir( "print$", null_pw, res_type, user->vuid, &nt_status );
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
|
|
||||||
if ( !conn ) {
|
if ( !conn ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user