NT owner, ACL info?

Rob Riggs rob at devilsthumb.com
Thu Apr 16 17:25:44 GMT 1998


Richard Sharpe wrote:
> 
> I too added long file name support to Samba just recently. I have a copy of
> your changes, but have not looked at them carefully.
> 
> My feeling however, is that do_tarput needs to be rewritten.

I did have to touch do_tarput with my changes, but I tried
to tread lightly in do_tarput(), since I did not have time
to delve in to it too deeply. It's a complicated mess.

> I would be interested in working with you on this, and since I have access
> to the sources (as a member of the Samba team) we can get the changes in.
> 
> I am also interested in what you have done with Amanda. I am also the
> author of SMBlib and it seems that SMBlib might be useful in such situations.

I've only worked with Amanda for a week or so. All I've done
so far is to do some basic work to get Samba support going
in 'amrecover'. But I'm going to concentrate on a Python based
GUI recovery tool. I would love to get an SMBlib python module
working.

One of my concerns is that for Amanda to work properly with
Samba, Samba must be patched to support 'long long' types in
order to get proper dump size information. I don't know if
there is another way to work around this problem yet.

> I have some more changes that I want to add. These include allowing the use
> of regexec to specify what files to save to a tar file and what files to
> restore.
> 
> I have long file name support incorporated into samba-1.9.18p5, and have
> the regex stuff working when creating a tar file, but only for Linux so
> far. I have yet to test other systems, and am concerned that not all of
> them will support regex.h, regcomp and regexec.

You might check out how xfmail handles this. If I recall,
it has it's own regex stuff in order to deal with these
deficiencies.

> >I also would like to submit a patch to smbclient
> >that puts quotes around the filenames returned by
> >'ls' and 'dir'. Currently there is no easy way for
> >scripts to parse the output of these commands. Any
> >problems with this? Will it break anything?
> 
> Hmmm, this sounds useful ... Can you send it over ...

Here you go:

--- client.c.orig2      Thu Apr 16 09:57:08 1998
+++ client.c    Thu Apr 16 10:12:16 1998
@@ -462,10 +462,21 @@
  
****************************************************************************/
 static void display_finfo(file_info *finfo)
 {
+  pstring filename;
+  char *fname_cnv;
+  int fname_len;
+  
+  fname_cnv = CNV_LANG(finfo->name);
+  fname_len = strlen(fname_cnv);
+  filename[0] = '\"';
+  StrnCpy(&filename[1], fname_cnv, fname_len);
+  filename[fname_len + 1] = '\"';
+  filename[fname_len + 2] = 0;
+  
   if (do_this_one(finfo)) {
     time_t t = finfo->mtime; /* the time is assumed to be passed as GMT
*/
     DEBUG(0,("  %-30s%7.7s%10d  %s",
-          CNV_LANG(finfo->name),
+          filename,
           attrib_string(finfo->mode),
           finfo->size,
           asctime(LocalTime(&t))));


Note: I might need to check that fname_len is not > 1021. Is
it possible for NT filenames to be that long? (We're talking
filenames, not pathnames here.)

-- 
Rob Riggs                        Devil's Thumb Entertainment
Network Administrator            Boulder, CO - (303) 938-1200
rob at DevilsThumb.COM              http://www.DevilsThumb.COM/~rob
"The notion of errors is ill-defined." - IRIX 'netstat' man page


More information about the samba-technical mailing list