From 26bfe37a10f7337acb8c5ac0e04fac7a8dddc769 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 28 Oct 2003 18:32:03 +0000 Subject: [PATCH] Don't log at level zero when chdir fails. Ensure correct error message is returned. Jeremy. --- source/msdfs/msdfs.c | 3 ++- source/smbd/trans2.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c index 20814c2ceba..ce29c506bbc 100644 --- a/source/msdfs/msdfs.c +++ b/source/msdfs/msdfs.c @@ -101,7 +101,8 @@ static BOOL create_conn_struct( connection_struct *conn, int snum, char *path) return False; } if (vfs_ChDir(conn,conn->connectpath) != 0) { - DEBUG(0,("create_conn_struct: Can't ChDir to new conn path %s\n", conn->connectpath)); + DEBUG(3,("create_conn_struct: Can't ChDir to new conn path %s. Error was %s\n", + conn->connectpath, strerror(errno) )); talloc_destroy( conn->mem_ctx ); return False; } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 5677fb9a417..394adeeb6f5 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -3298,7 +3298,7 @@ static int call_trans2getdfsreferral(connection_struct *conn, char* inbuf, srvstr_pull(inbuf, pathname, ¶ms[2], sizeof(pathname), -1, STR_TERMINATE); if((reply_size = setup_dfs_referral(conn, pathname,max_referral_level,ppdata)) < 0) - return ERROR_DOS(ERRDOS,ERRbadfile); + return UNIXERROR(ERRDOS,ERRbadfile); SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_DFS_PATHNAMES); send_trans2_replies(outbuf,bufsize,0,0,*ppdata,reply_size); -- 2.11.4.GIT