From 08d00eb68ee93eaead0f3bbaabc3d89540e0818e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 24 Oct 1996 00:09:08 +0000 Subject: - 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) --- source3/lib/fault.c | 4 ---- source3/lib/util.c | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'source3/lib') 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 @@ -270,6 +270,21 @@ va_dcl return(0); } +/**************************************************************************** + 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 ****************************************************************************/ -- cgit