summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-10-24 00:09:08 +0000
committerAndrew Tridgell <tridge@samba.org>1996-10-24 00:09:08 +0000
commit08d00eb68ee93eaead0f3bbaabc3d89540e0818e (patch)
tree710ccb9b7720c18394876a415803b4a414df8b26 /source3/lib
parent99ad4508a086205a7801e88a2f74ad6fe839431f (diff)
downloadsamba-08d00eb68ee93eaead0f3bbaabc3d89540e0818e.tar.gz
samba-08d00eb68ee93eaead0f3bbaabc3d89540e0818e.tar.bz2
samba-08d00eb68ee93eaead0f3bbaabc3d89540e0818e.zip
- added support for TMPDIR env variable
- fixed fault.c for linux 2.1 - put back in the FIND_SELF failing code - cleaned up casts in encryption (This used to be commit 3af04f1580b2569c0a4f2549bf6352c7a25afa0d)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/fault.c4
-rw-r--r--source3/lib/util.c17
2 files changed, 16 insertions, 5 deletions
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index 20c75f7876..9bc2eca7e0 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -19,10 +19,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef LINUX
-#define __KERNEL__
-#endif
-
#include "includes.h"
extern int DEBUGLEVEL;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d82dbddb44..63dda489d4 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -54,7 +54,7 @@ int trans_num = 0;
*/
int case_default = CASE_LOWER;
-pstring debugf = "/tmp/log.samba";
+pstring debugf = "";
int syslog_level;
/* the following control case operations - they are put here so the
@@ -271,6 +271,21 @@ va_dcl
}
/****************************************************************************
+ find a suitable temporary directory. The result should be copied immediately
+ as it may be overwritten by a subsequent call
+ ****************************************************************************/
+char *tmpdir(void)
+{
+ char *p;
+ if ((p = getenv("TMPDIR"))) {
+ return p;
+ }
+ return "/tmp";
+}
+
+
+
+/****************************************************************************
determine if a file descriptor is in fact a socket
****************************************************************************/
BOOL is_a_socket(int fd)