/ OpenBSD : Next step : segfault

Alain BARBET alb at
Sat Mar 2 07:09:04 GMT 2002

OK sorry for that, one more time I forget to create an empty 
$HOME/.smb/smb.conf :-(((

With that this is ok ....
- In the Filesys::SmbClient perl module, I check is the file exist and if not 
create an empty file
- In my professional work (build a search engine),  I make this thing too ... 
Someting in C++ code we can see:

    // Un gruge horrible pour contourner le pb de $HOME/.smb/smb.conf
    // necessaire a la librairie client
    mkdir("/tmp/.smb", 0755);
    int fd = open("/tmp/.smb/smb.conf", O_CREAT, S_IRUSR | S_IROTH);
    if (fd != -1) close(fd);
    // Fin gruge horrible

I will force to set HOME variable because we can be in a CGI env ...
Sure you didn't want check if file exist before use it ?


More information about the samba-technical mailing list