mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
Remove the copyright to Canon Information Systems Australia, as we don't
want them to have the copyright. Added a new DOSERR response code that Win95 returns, unimp, unimplemented. Added code to ignore errors on setting remote time, as Win 95 does not like the time being changed on a directory. Win NT and Samba are OK at this. This is the next to last clean-ups here. Next is to properly handle restore times on directories (except for Win95--see above). Now have Jay's changes in and have fixed a bug reported by Tim Lee.
This commit is contained in:
@ -102,6 +102,7 @@ BOOL tar_system=True;
|
|||||||
BOOL tar_hidden=True;
|
BOOL tar_hidden=True;
|
||||||
/* Be noisy - make a catalogue */
|
/* Be noisy - make a catalogue */
|
||||||
BOOL tar_noisy=True;
|
BOOL tar_noisy=True;
|
||||||
|
BOOL tar_real_noisy=True;
|
||||||
|
|
||||||
char tar_type='\0';
|
char tar_type='\0';
|
||||||
static char **cliplist=NULL;
|
static char **cliplist=NULL;
|
||||||
@ -568,7 +569,7 @@ static int strslashcmp(char *s1, char *s2)
|
|||||||
do_setrtime, set time on a file or dir ...
|
do_setrtime, set time on a file or dir ...
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
static int do_setrtime(char *fname, int mtime)
|
static int do_setrtime(char *fname, int mtime, BOOL err_silent)
|
||||||
{
|
{
|
||||||
char *inbuf, *outbuf, *p;
|
char *inbuf, *outbuf, *p;
|
||||||
char *name;
|
char *name;
|
||||||
@ -583,9 +584,15 @@ static int do_setrtime(char *fname, int mtime)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_strcpy(name, "\\", strlen(fname) + 1);
|
if (*fname != '\\')
|
||||||
|
safe_strcpy(name, "\\", strlen(fname) + 1);
|
||||||
|
else
|
||||||
|
safe_strcpy(name, "", strlen(fname) + 1);
|
||||||
safe_strcat(name, fname, strlen(fname) + 1);
|
safe_strcat(name, fname, strlen(fname) + 1);
|
||||||
|
|
||||||
|
if (fname[strlen(name) - 1] == '\\')
|
||||||
|
name[strlen(name) - 1] = '\0';
|
||||||
|
|
||||||
inbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
|
inbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
|
||||||
outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
|
outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN);
|
||||||
|
|
||||||
@ -619,8 +626,10 @@ static int do_setrtime(char *fname, int mtime)
|
|||||||
|
|
||||||
if (CVAL(inbuf,smb_rcls) != 0)
|
if (CVAL(inbuf,smb_rcls) != 0)
|
||||||
{
|
{
|
||||||
DEBUG(0,("%s setting attributes on file %s\n",
|
if (!err_silent) {
|
||||||
smb_errstr(inbuf), fname));
|
DEBUG(0,("%s setting attributes on file %s\n",
|
||||||
|
smb_errstr(inbuf), fname));
|
||||||
|
}
|
||||||
free(name);free(inbuf);free(outbuf);
|
free(name);free(inbuf);free(outbuf);
|
||||||
return(False);
|
return(False);
|
||||||
}
|
}
|
||||||
@ -1954,10 +1963,12 @@ static void do_tarput()
|
|||||||
|
|
||||||
DEBUG(5, ("Updating creation date on %s\n", finfo.name));
|
DEBUG(5, ("Updating creation date on %s\n", finfo.name));
|
||||||
|
|
||||||
if (!do_setrtime(finfo.name, finfo.mtime)) {
|
if (!do_setrtime(finfo.name, finfo.mtime, True)) {
|
||||||
|
|
||||||
DEBUG(0, ("Could not set time on file: %s\n", finfo.name));
|
if (tar_real_noisy) {
|
||||||
return;
|
DEBUG(0, ("Could not set time on file: %s\n", finfo.name));
|
||||||
|
}
|
||||||
|
/*return; /* Win 95 does not like setting time on dirs */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ implemented */
|
|||||||
#define ERRnofiles 18 /* no more files found in file search */
|
#define ERRnofiles 18 /* no more files found in file search */
|
||||||
#define ERRbadshare 32 /* Share mode on file conflict with open mode */
|
#define ERRbadshare 32 /* Share mode on file conflict with open mode */
|
||||||
#define ERRlock 33 /* Lock request conflicts with existing lock */
|
#define ERRlock 33 /* Lock request conflicts with existing lock */
|
||||||
|
#define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
|
||||||
#define ERRfilexists 80 /* File in operation already exists */
|
#define ERRfilexists 80 /* File in operation already exists */
|
||||||
#define ERRcannotopen 110 /* Cannot open the file specified */
|
#define ERRcannotopen 110 /* Cannot open the file specified */
|
||||||
#define ERRunknownlevel 124
|
#define ERRunknownlevel 124
|
||||||
|
@ -58,6 +58,7 @@ err_code_struct dos_msgs[] = {
|
|||||||
{"ERRnofiles",18,"A File Search command can find no more files matching the specified criteria."},
|
{"ERRnofiles",18,"A File Search command can find no more files matching the specified criteria."},
|
||||||
{"ERRbadshare",32,"The sharing mode specified for an Open conflicts with existing FIDs on the file."},
|
{"ERRbadshare",32,"The sharing mode specified for an Open conflicts with existing FIDs on the file."},
|
||||||
{"ERRlock",33,"A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."},
|
{"ERRlock",33,"A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."},
|
||||||
|
{"ERRunsup", 50, "The operation is unsupported"},
|
||||||
{"ERRnosuchshare", 67, "You specified an invalid share name"},
|
{"ERRnosuchshare", 67, "You specified an invalid share name"},
|
||||||
{"ERRfilexists",80,"The file named in a Create Directory, Make New File or Link request already exists."},
|
{"ERRfilexists",80,"The file named in a Create Directory, Make New File or Link request already exists."},
|
||||||
{"ERRbadpipe",230,"Pipe invalid."},
|
{"ERRbadpipe",230,"Pipe invalid."},
|
||||||
|
Reference in New Issue
Block a user