restore errno after smbw initialisation
authorAndrew Tridgell <tridge@samba.org>
Wed, 7 Oct 1998 11:07:24 +0000 (11:07 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 7 Oct 1998 11:07:24 +0000 (11:07 +0000)
(This used to be commit f374706cbf654bdb33df3074cb1a8101af0201eb)

source3/smbwrapper/smbw.c

index 392ca05bfb436b24573d00a51c03e218db2d2bcb..2dcf4cc588d97331ad174c80fe3eb11b76a13e75 100644 (file)
@@ -48,10 +48,13 @@ void smbw_init(void)
        static pstring servicesf = CONFIGFILE;
        extern FILE *dbf;
        char *p;
+       int eno;
 
        if (initialised) return;
        initialised = 1;
 
+       eno = errno;
+
        smbw_busy++;
 
        DEBUGLEVEL = 0;
@@ -98,6 +101,8 @@ void smbw_init(void)
        smbw_busy--;
 
        set_maxfiles();
+
+       errno = eno;
 }
 
 /*****************************************************