printing = bsd
printcap name = /dev/null
+# min receivefile size = 4000
+
[tmp]
path = $PREFIX_ABS/tmp
read only = no
int file_set_dosmode(connection_struct *conn, const char *fname,
uint32 dosmode, SMB_STRUCT_STAT *st,
- const char *parent_dir)
+ const char *parent_dir,
+ bool newfile)
{
SMB_STRUCT_STAT st1;
int mask=0;
/* Store the DOS attributes in an EA by preference. */
if (set_ea_dos_attribute(conn, fname, st, dosmode)) {
+ if (!newfile) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
+ }
return 0;
}
}
if ((ret = SMB_VFS_CHMOD(conn,fname,unixmode)) == 0) {
- notify_fname(conn, NOTIFY_ACTION_MODIFIED,
- FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
+ if (!newfile) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
+ }
return 0;
}
ret = SMB_VFS_FCHMOD(fsp, fsp->fh->fd, unixmode);
unbecome_root();
close_file_fchmod(fsp);
- notify_fname(conn, NOTIFY_ACTION_MODIFIED,
- FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
+ if (!newfile) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
+ }
}
return( ret );
if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st) == 0) {
int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st);
- if ((lp_store_dos_attributes(SNUM(fsp->conn)) || MAP_ARCHIVE(fsp->conn)) && !IS_DOS_ARCHIVE(dosmode)) {
- file_set_dosmode(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st, False);
+ if ((lp_store_dos_attributes(SNUM(fsp->conn)) ||
+ MAP_ARCHIVE(fsp->conn)) &&
+ !IS_DOS_ARCHIVE(dosmode)) {
+ file_set_dosmode(fsp->conn,fsp->fsp_name,
+ dosmode | aARCH,&st,
+ NULL,
+ false);
}
/*
creates the file. This isn't the correct thing to do in the copy
case. JRA */
file_set_dosmode(conn, newname, fattr, &sbuf2,
- parent_dirname(newname));
+ parent_dirname(newname),false);
if (ret < (SMB_OFF_T)sbuf1.st_size) {
return NT_STATUS_DISK_FULL;
if (!posix_open) {
file_set_dosmode(conn, fname,
new_dos_attributes | aARCH, NULL,
- parent_dir);
+ parent_dir,
+ true);
}
}
}
if (!posix_open) {
file_set_dosmode(conn, name,
file_attributes | aDIR, NULL,
- parent_dir);
+ parent_dir,
+ true);
}
}
else
mode &= ~aDIR;
- if (file_set_dosmode(conn,fname,mode,&sbuf,False) != 0) {
+ if (file_set_dosmode(conn,fname,mode,&sbuf,NULL,false) != 0) {
reply_unixerror(req, ERRDOS, ERRnoaccess);
END_PROFILE(SMBsetatr);
return;
DEBUG(10,("smb_set_file_dosmode: file %s : setting dos mode 0x%x\n",
fname, (unsigned int)dosmode ));
- if(file_set_dosmode(conn, fname, dosmode, psbuf, False)) {
+ if(file_set_dosmode(conn, fname, dosmode, psbuf, NULL, false)) {
DEBUG(2,("smb_set_file_dosmode: file_set_dosmode of %s failed (%s)\n",
fname, strerror(errno)));
return map_nt_error_from_unix(errno);