in the function prototype, and change callers to respect this.
Andrew Bartlett
struct current_user user;
connection_struct *conn = NULL;
BOOL became_user = False;
+ fstring dev;
+ fstrcpy(dev, "A:");
ZERO_STRUCT(st);
get_current_user(&user, p);
become_root();
- conn = make_connection(qualname, null_pw, "A:", user.vuid, &nt_status);
+ conn = make_connection(qualname, null_pw, dev, user.vuid, &nt_status);
unbecome_root();
if (conn == NULL) {
struct current_user user;
connection_struct *conn = NULL;
BOOL became_user = False;
+ fstring dev;
+ fstrcpy(dev, "A:");
ZERO_STRUCT(st);
+
r_u->status = WERR_OK;
unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname));
get_current_user(&user, p);
become_root();
- conn = make_connection(qualname, null_pw, "A:", user.vuid, &nt_status);
+ conn = make_connection(qualname, null_pw, dev, user.vuid, &nt_status);
unbecome_root();
if (conn == NULL) {
const char *service;
pstring service_buf;
pstring password;
- pstring dev;
+ fstring dev;
int outsize = 0;
uint16 vuid = SVAL(inbuf,smb_uid);
int pwlen=0;
{
fstring service;
DATA_BLOB password;
- pstring devicename;
+ fstring devicename;
NTSTATUS nt_status;
uint16 vuid = SVAL(inbuf,smb_uid);
int passlen = SVAL(inbuf,smb_vwv3);
do some basic sainity checks on the share.
This function modifies dev, ecode.
****************************************************************************/
-static NTSTATUS share_sanity_checks(int snum, pstring dev)
+static NTSTATUS share_sanity_checks(int snum, fstring dev)
{
if (!lp_snum_ok(snum) ||
if (dev[0] == '?' || !dev[0]) {
if (lp_print_ok(snum)) {
- pstrcpy(dev,"LPT1:");
+ fstrcpy(dev,"LPT1:");
} else {
- pstrcpy(dev,"A:");
+ fstrcpy(dev,"A:");
}
}
/* Behave as a printer if we are supposed to */
if (lp_print_ok(snum) && (strcmp(dev, "A:") == 0)) {
- pstrcpy(dev, "LPT1:");
+ fstrcpy(dev, "LPT1:");
}
return NT_STATUS_OK;
static connection_struct *make_connection_snum(int snum, user_struct *vuser,
DATA_BLOB password,
- char *dev, NTSTATUS *status)
+ fstring dev, NTSTATUS *status)
{
struct passwd *pass = NULL;
BOOL guest = False;
****************************************************************************/
connection_struct *make_connection(const char *service_in, DATA_BLOB password,
- char *dev, uint16 vuid, NTSTATUS *status)
+ fstring dev, uint16 vuid, NTSTATUS *status)
{
uid_t euid;
user_struct *vuser = NULL;