diff options
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r-- | source3/libsmb/clientgen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 0436fb9df5..e37974b570 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -1231,6 +1231,7 @@ int cli_nt_create(struct cli_state *cli, char *fname) /**************************************************************************** open a file +WARNING: if you open with O_WRONLY then getattrE won't work! ****************************************************************************/ int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode) { @@ -1238,12 +1239,6 @@ int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode) unsigned openfn=0; unsigned accessmode=0; - /* you must open for RW not just write - otherwise getattrE doesn't - work! */ - if ((flags & O_ACCMODE) == O_WRONLY && strncmp(cli->dev, "LPT", 3)) { - flags = (flags & ~O_ACCMODE) | O_RDWR; - } - if (flags & O_CREAT) openfn |= (1<<4); if (!(flags & O_EXCL)) { @@ -1267,6 +1262,10 @@ int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode) } #endif /* O_SYNC */ + if (share_mode == DENY_FCB) { + accessmode = 0xFF; + } + memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); |