*** samba-3.0.20a/source/lib/afs_settoken.c	Sat Feb 26 04:59:32 2005
--- samba-3.0.20a-jc/source/lib/afs_settoken.c	Sun Oct 30 09:37:07 2011
***************
*** 197,203 ****
  	iob.out_size = sizeof(buf);
  
  #if 0
! 	file_save("/tmp/ioctlbuf", iob.in, iob.in_size);
  #endif
  
  	ret = afs_syscall(AFSCALL_PIOCTL, 0, VIOCSETTOK, (char *)&iob, 0);
--- 197,203 ----
  	iob.out_size = sizeof(buf);
  
  #if 0
! 	file_save("/data/data/com.funkyfresh.samba/files/var/tmp/ioctlbuf", iob.in, iob.in_size);
  #endif
  
  	ret = afs_syscall(AFSCALL_PIOCTL, 0, VIOCSETTOK, (char *)&iob, 0);
*** samba-3.0.20a/source/lib/util.c	Fri Sep 30 07:52:43 2005
--- samba-3.0.20a-jc/source/lib/util.c	Sun Oct 30 09:37:58 2011
***************
*** 274,280 ****
  	char *p;
  	if ((p = getenv("TMPDIR")))
  		return p;
! 	return "/tmp";
  }
  
  /****************************************************************************
--- 274,280 ----
  	char *p;
  	if ((p = getenv("TMPDIR")))
  		return p;
! 	return "/data/data/com.funkyfresh.samba/files/var/tmp";
  }
  
  /****************************************************************************
*** samba-3.0.20a/source/libads/kerberos_verify.c	Fri Sep 30 07:52:47 2005
--- samba-3.0.20a-jc/source/libads/kerberos_verify.c	Sun Oct 30 09:38:41 2011
***************
*** 366,372 ****
  	dump_data_pw("SMB session key (from ticket)\n", session_key->data, session_key->length);
  
  #if 0
! 	file_save("/tmp/ticket.dat", ticket->data, ticket->length);
  #endif
  
  	get_auth_data_from_tkt(auth_data, tkt);
--- 366,372 ----
  	dump_data_pw("SMB session key (from ticket)\n", session_key->data, session_key->length);
  
  #if 0
! 	file_save("/data/data/com.funkyfresh.samba/files/var/tmp/ticket.dat", ticket->data, ticket->length);
  #endif
  
  	get_auth_data_from_tkt(auth_data, tkt);
***************
*** 379,385 ****
  
  #if 0
  	if (tkt->enc_part2) {
! 		file_save("/tmp/authdata.dat",
  			  tkt->enc_part2->authorization_data[0]->contents,
  			  tkt->enc_part2->authorization_data[0]->length);
  	}
--- 379,385 ----
  
  #if 0
  	if (tkt->enc_part2) {
! 		file_save("/data/data/com.funkyfresh.samba/files/var/tmp/authdata.dat",
  			  tkt->enc_part2->authorization_data[0]->contents,
  			  tkt->enc_part2->authorization_data[0]->length);
  	}
*** samba-3.0.20a/source/libads/ldap.c	Thu Jul 28 23:19:50 2005
--- samba-3.0.20a-jc/source/libads/ldap.c	Sun Oct 30 09:39:21 2011
***************
*** 1906,1912 ****
  	}
  
  #if 0
! 	file_save("/tmp/sec_desc.new", ps_wire.data_p, sd_size);
  #endif
  	if (!(mods = ads_init_mods(ctx))) return ADS_ERROR(LDAP_NO_MEMORY);
  
--- 1906,1912 ----
  	}
  
  #if 0
! 	file_save("/data/data/com.funkyfresh.samba/files/var/tmp/sec_desc.new", ps_wire.data_p, sd_size);
  #endif
  	if (!(mods = ads_init_mods(ctx))) return ADS_ERROR(LDAP_NO_MEMORY);
  
*** samba-3.0.20a/source/utils/smbpasswd.c	Tue Apr 19 02:38:21 2005
--- samba-3.0.20a-jc/source/utils/smbpasswd.c	Tue Nov  1 22:04:34 2011
***************
*** 43,72 ****
  **********************************************************/
  static void usage(void)
  {
! 	printf("When run by root:\n");
  	printf("    smbpasswd [options] [username]\n");
- 	printf("otherwise:\n");
- 	printf("    smbpasswd [options]\n\n");
  
  	printf("options:\n");
- 	printf("  -L                   local mode (must be first option)\n");
  	printf("  -h                   print this usage message\n");
  	printf("  -s                   use stdin for password prompt\n");
  	printf("  -c smb.conf file     Use the given path to the smb.conf file\n");
  	printf("  -D LEVEL             debug level\n");
- 	printf("  -r MACHINE           remote machine\n");
- 	printf("  -U USER              remote username\n");
- 
- 	printf("extra options when run by root or in local mode:\n");
  	printf("  -a                   add user\n");
  	printf("  -d                   disable user\n");
  	printf("  -e                   enable user\n");
- 	printf("  -i                   interdomain trust account\n");
- 	printf("  -m                   machine trust account\n");
- 	printf("  -n                   set no password\n");
- 	printf("  -w PASSWORD          ldap admin password\n");
  	printf("  -x                   delete user\n");
- 	printf("  -R ORDER             name resolve order\n");
  
  	exit(1);
  }
--- 43,60 ----
  **********************************************************/
  static void usage(void)
  {
! 	printf("Must run as root:\n");
  	printf("    smbpasswd [options] [username]\n");
  
  	printf("options:\n");
  	printf("  -h                   print this usage message\n");
  	printf("  -s                   use stdin for password prompt\n");
  	printf("  -c smb.conf file     Use the given path to the smb.conf file\n");
  	printf("  -D LEVEL             debug level\n");
  	printf("  -a                   add user\n");
  	printf("  -d                   disable user\n");
  	printf("  -e                   enable user\n");
  	printf("  -x                   delete user\n");
  
  	exit(1);
  }
***************
*** 92,102 ****
  
  	user_name[0] = '\0';
  
! 	while ((ch = getopt(argc, argv, "c:axdehminjr:sw:R:D:U:L")) != EOF) {
  		switch(ch) {
- 		case 'L':
- 			local_flags |= LOCAL_AM_ROOT;
- 			break;
  		case 'c':
  			pstrcpy(configfile,optarg);
  			break;
--- 80,87 ----
  
  	user_name[0] = '\0';
  
! 	while ((ch = getopt(argc, argv, "c:axdeh:sD:L")) != EOF) {
  		switch(ch) {
  		case 'c':
  			pstrcpy(configfile,optarg);
  			break;
***************
*** 115,154 ****
  			local_flags |= LOCAL_ENABLE_USER;
  			local_flags &= ~LOCAL_SET_PASSWORD;
  			break;
- 		case 'm':
- 			local_flags |= LOCAL_TRUST_ACCOUNT;
- 			break;
- 		case 'i':
- 			local_flags |= LOCAL_INTERDOM_ACCOUNT;
- 			break;
- 		case 'j':
- 			d_printf("See 'net join' for this functionality\n");
- 			exit(1);
- 			break;
- 		case 'n':
- 			local_flags |= LOCAL_SET_NO_PASSWORD;
- 			local_flags &= ~LOCAL_SET_PASSWORD;
- 			new_passwd = smb_xstrdup("NO PASSWORD");
- 			break;
- 		case 'r':
- 			remote_machine = optarg;
- 			break;
  		case 's':
  			set_line_buffering(stdin);
  			set_line_buffering(stdout);
  			set_line_buffering(stderr);
  			stdin_passwd_get = True;
  			break;
- 		case 'w':
- 			local_flags |= LOCAL_SET_LDAP_ADMIN_PW;
- 			fstrcpy(ldap_secret, optarg);
- 			break;
- 		case 'R':
- 			lp_set_name_resolve_order(optarg);
- 			break;
- 		case 'D':
- 			DEBUGLEVEL = atoi(optarg);
- 			break;
  		case 'U': {
  			got_username = True;
  			fstrcpy(user_name, optarg);
--- 100,111 ----
***************
*** 246,269 ****
   
  	p = get_pass("New SMB password:", stdin_get);
  
! 	fstrcpy(new_pw, p);
  	SAFE_FREE(p);
  
! 	p = get_pass("Retype new SMB password:", stdin_get);
  
  	if (strcmp(p, new_pw)) {
  		fprintf(stderr, "Mismatch - password unchanged.\n");
  		ZERO_ARRAY(new_pw);
  		SAFE_FREE(p);
  		return NULL;
! 	}
  
  	return p;
  }
  
  
  /*************************************************************
!  Change a password either locally or remotely.
  *************************************************************/
  
  static BOOL password_change(const char *remote_mach, char *username, 
--- 203,226 ----
   
  	p = get_pass("New SMB password:", stdin_get);
  
! 	/* fstrcpy(new_pw, p);
  	SAFE_FREE(p);
  
! 	 p = get_pass("Retype new SMB password:", stdin_get);
  
  	if (strcmp(p, new_pw)) {
  		fprintf(stderr, "Mismatch - password unchanged.\n");
  		ZERO_ARRAY(new_pw);
  		SAFE_FREE(p);
  		return NULL;
! 	} */
  
  	return p;
  }
  
  
  /*************************************************************
!  Change a password locally .
  *************************************************************/
  
  static BOOL password_change(const char *remote_mach, char *username, 
***************
*** 273,296 ****
  	pstring err_str;
  	pstring msg_str;
  
- 	if (remote_mach != NULL) {
- 		if (local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|
- 							LOCAL_TRUST_ACCOUNT|LOCAL_SET_NO_PASSWORD)) {
- 			/* these things can't be done remotely yet */
- 			return False;
- 		}
- 		ret = remote_password_change(remote_mach, username, 
- 					     old_passwd, new_pw, err_str, sizeof(err_str));
- 		if(*err_str)
- 			fprintf(stderr, "%s", err_str);
- 		return ret;
- 	}
- 	
  	ret = local_password_change(username, local_flags, new_pw, 
  				     err_str, sizeof(err_str), msg_str, sizeof(msg_str));
  
  	if(*msg_str)
! 		printf("%s", msg_str);
  	if(*err_str)
  		fprintf(stderr, "%s", err_str);
  
--- 230,240 ----
  	pstring err_str;
  	pstring msg_str;
  
  	ret = local_password_change(username, local_flags, new_pw, 
  				     err_str, sizeof(err_str), msg_str, sizeof(msg_str));
  
  	if(*msg_str)
! 		printf(msg_str);
  	if(*err_str)
  		fprintf(stderr, "%s", err_str);
  
***************
*** 300,306 ****
  /*******************************************************************
   Store the LDAP admin password in secrets.tdb
   ******************************************************************/
! static BOOL store_ldap_admin_pw (char* pw)
  {	
  	if (!pw) 
  		return False;
--- 244,250 ----
  /*******************************************************************
   Store the LDAP admin password in secrets.tdb
   ******************************************************************/
! /* static BOOL store_ldap_admin_pw (char* pw)
  {	
  	if (!pw) 
  		return False;
***************
*** 310,316 ****
  	
  	return secrets_store_ldap_pw(lp_ldap_admin_dn(), pw);
  }
! 
  
  /*************************************************************
   Handle password changing for root.
--- 254,260 ----
  	
  	return secrets_store_ldap_pw(lp_ldap_admin_dn(), pw);
  }
! */
  
  /*************************************************************
   Handle password changing for root.
***************
*** 322,338 ****
  	int result = 0;
  	char *old_passwd = NULL;
  
! 	if (local_flags & LOCAL_SET_LDAP_ADMIN_PW) {
  		printf("Setting stored password for \"%s\" in secrets.tdb\n", 
  			lp_ldap_admin_dn());
  		if (!store_ldap_admin_pw(ldap_secret))
  			DEBUG(0,("ERROR: Failed to store the ldap admin password!\n"));
  		goto done;
! 	}
  
  	/* Ensure passdb startup(). */
  	if(!initialize_password_db(False)) {
- 		DEBUG(0, ("Failed to open passdb!\n"));
  		exit(1);
  	}
  		
--- 266,281 ----
  	int result = 0;
  	char *old_passwd = NULL;
  
! /*	if (local_flags & LOCAL_SET_LDAP_ADMIN_PW) {
  		printf("Setting stored password for \"%s\" in secrets.tdb\n", 
  			lp_ldap_admin_dn());
  		if (!store_ldap_admin_pw(ldap_secret))
  			DEBUG(0,("ERROR: Failed to store the ldap admin password!\n"));
  		goto done;
! 	} */
  
  	/* Ensure passdb startup(). */
  	if(!initialize_password_db(False)) {
  		exit(1);
  	}
  		
***************
*** 352,360 ****
  	
  	/* Only load interfaces if we are doing network operations. */
  
! 	if (remote_machine) {
  		load_interfaces();
! 	}
  
  	if (!user_name[0] && (pwd = getpwuid_alloc(geteuid()))) {
  		fstrcpy(user_name, pwd->pw_name);
--- 295,303 ----
  	
  	/* Only load interfaces if we are doing network operations. */
  
! /*	if (remote_machine) {
  		load_interfaces();
! 	} */
  
  	if (!user_name[0] && (pwd = getpwuid_alloc(geteuid()))) {
  		fstrcpy(user_name, pwd->pw_name);
***************
*** 457,465 ****
  		goto done;
  	} 
  
! 	if(remote_machine) {
  		printf("Password changed for user %s on %s.\n", user_name, remote_machine );
! 	} else if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD|LOCAL_SET_PASSWORD))) {
  		SAM_ACCOUNT *sampass = NULL;
  		BOOL ret;
  		
--- 400,408 ----
  		goto done;
  	} 
  
! /*	if(remote_machine) {
  		printf("Password changed for user %s on %s.\n", user_name, remote_machine );
! 	} else*/ if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD|LOCAL_SET_PASSWORD))) {
  		SAM_ACCOUNT *sampass = NULL;
  		BOOL ret;
  		
***************
*** 484,555 ****
  /*************************************************************
   Handle password changing for non-root.
  *************************************************************/
! 
  static int process_nonroot(int local_flags)
  {
- 	struct passwd  *pwd = NULL;
- 	int result = 0;
- 	char *old_pw = NULL;
- 	char *new_pw = NULL;
- 
- 	if (local_flags & ~(LOCAL_AM_ROOT | LOCAL_SET_PASSWORD)) {
- 		/* Extra flags that we can't honor non-root */
- 		usage();
- 	}
- 
- 	if (!user_name[0]) {
- 		pwd = getpwuid_alloc(getuid());
- 		if (pwd) {
- 			fstrcpy(user_name,pwd->pw_name);
- 			passwd_free(&pwd);
- 		} else {
- 			fprintf(stderr, "smbpasswd: cannot lookup user name for uid %u\n", (unsigned int)getuid());
- 			exit(1);
- 		}
- 	}
- 	
- 	/*
- 	 * A non-root user is always setting a password
- 	 * via a remote machine (even if that machine is
- 	 * localhost).
- 	 */	
- 
- 	load_interfaces(); /* Delayed from main() */
- 
- 	if (remote_machine == NULL) {
- 		remote_machine = "127.0.0.1";
- 	}
- 
- 	if (remote_machine != NULL) {
- 		old_pw = get_pass("Old SMB password:",stdin_passwd_get);
- 	}
- 	
- 	if (!new_passwd) {
- 		new_pw = prompt_for_new_password(stdin_passwd_get);
- 	}
- 	else
- 		new_pw = smb_xstrdup(new_passwd);
- 	
- 	if (!new_pw) {
- 		fprintf(stderr, "Unable to get new password.\n");
- 		exit(1);
- 	}
- 
- 	if (!password_change(remote_machine, user_name, old_pw, new_pw, 0)) {
- 		fprintf(stderr,"Failed to change password for %s\n", user_name);
- 		result = 1;
- 		goto done;
- 	}
- 
- 	printf("Password changed for user %s\n", user_name);
- 
-  done:
- 	SAFE_FREE(old_pw);
- 	SAFE_FREE(new_pw);
- 
- 	return result;
  }
! 
  
  
  /*********************************************************
--- 427,437 ----
  /*************************************************************
   Handle password changing for non-root.
  *************************************************************/
! /*
  static int process_nonroot(int local_flags)
  {
  }
! */
  
  
  /*********************************************************
***************
*** 592,596 ****
  		return process_root(local_flags);
  	} 
  
! 	return process_nonroot(local_flags);
  }
--- 474,479 ----
  		return process_root(local_flags);
  	} 
  
! 	//return process_nonroot(local_flags);
! 	return 1;
  }
*** samba-3.0.20a/source/nsswitch/winbindd_nss.h	Fri Sep 30 07:52:42 2005
--- samba-3.0.20a-jc/source/nsswitch/winbindd_nss.h	Sun Oct 30 09:40:09 2011
***************
*** 27,33 ****
  #define _WINBINDD_NTDOM_H
  
  #define WINBINDD_SOCKET_NAME "pipe"            /* Name of PF_UNIX socket */
! #define WINBINDD_SOCKET_DIR  "/tmp/.winbindd"  /* Name of PF_UNIX dir */
  #define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lockdir() to hold the 'privileged' pipe */
  #define WINBINDD_DOMAIN_ENV  "WINBINDD_DOMAIN" /* Environment variables */
  #define WINBINDD_DONT_ENV    "_NO_WINBINDD"
--- 27,33 ----
  #define _WINBINDD_NTDOM_H
  
  #define WINBINDD_SOCKET_NAME "pipe"            /* Name of PF_UNIX socket */
! #define WINBINDD_SOCKET_DIR  "/data/data/com.funkyfresh.samba/files/var/tmp/.winbindd"  /* Name of PF_UNIX dir */
  #define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lockdir() to hold the 'privileged' pipe */
  #define WINBINDD_DOMAIN_ENV  "WINBINDD_DOMAIN" /* Environment variables */
  #define WINBINDD_DONT_ENV    "_NO_WINBINDD"
*** samba-3.0.20a/source/lib/system.c	Fri Sep 30 07:52:43 2005
--- samba-3.0.20a-jc/source/lib/system.c	Sat Nov 12 03:51:25 2011
***************
*** 269,279 ****
  
  int sys_ftruncate(int fd, SMB_OFF_T offset)
  {
  #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FTRUNCATE64)
! 	return ftruncate64(fd, offset);
  #else
! 	return ftruncate(fd, offset);
  #endif
  }
  
  /*******************************************************************
--- 269,301 ----
  
  int sys_ftruncate(int fd, SMB_OFF_T offset)
  {
+ 
+ 	/*  Windows clients ask Samba to pre-allocate file size before beginning
+            a file transfer.  Samba does this using ftruncate(), however on vfat
+            filesystems this involves writing zeros to the file until it reaches 
+            the desired size.  For large files (several hundred megabytes and above)
+            Windows clients will time out and abort while waiting for ftruncate to
+            return from pre-allocation on slow I/O devices like sdcards. */
+ 
+         /* Dont use ftruncate on files over 180MB 
+            (I should check the underlying filesystem type too, and only ignore
+            ftruncate if fstype is vfat) */
+ 
+         if (offset > 188743680 ) {
+ 
+                 /* Write an empty file. */
+                 if (write (fd, "", 1) != 1)
+                         return -1;
+ 
+                 return 0;
+ 	} else {
+ 
  #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FTRUNCATE64)
! 		return ftruncate64(fd, offset);
  #else
! 		return ftruncate(fd, offset);
  #endif
+ 	}
  }
  
  /*******************************************************************
***************
*** 880,891 ****
  
  struct passwd *sys_getpwnam(const char *name)
  {
! 	return getpwnam(name);
  }
  
  struct passwd *sys_getpwuid(uid_t uid)
  {
! 	return getpwuid(uid);
  }
  
  struct group *sys_getgrnam(const char *name)
--- 902,953 ----
  
  struct passwd *sys_getpwnam(const char *name)
  {
! 	int c;
! 
! 	/* return getpwnam(name); /*
! 	/* Fake Android /etc/passwd
! 
!         -  only allow names that are <= 8 characters in length
!         -  contain a-z A-Z 0-9
! 
!         */
! 
! /* // let remove these limitations from here
! 	if (strlen(name) > 8) {
!            return NULL;
!         } 
! 
!         for (c=0; c < strlen(name); c++) {
!            if (! isalnum(name[c])) {
!               return NULL;
!            }
!          }
! */
!         struct passwd *ptmp;
!         ptmp = (struct passwd *)malloc(sizeof(struct passwd));
!         ptmp->pw_name = (char *)malloc(strlen(name)+1);
!         fstrcpy(ptmp->pw_name,name);
!         ptmp->pw_passwd = (char *)malloc(strlen("*")+1);
!         fstrcpy(ptmp->pw_passwd,"*");
!         ptmp->pw_uid = 0;
!         if (strcmp(name,"system") == 0) {
!           ptmp->pw_gid = 1015;
!         } else {
!           ptmp->pw_gid = 0;
!         }
!         ptmp->pw_gecos = (char *)malloc(strlen(name)+1);
!         fstrcpy(ptmp->pw_gecos,name);
!         ptmp->pw_dir = (char *)malloc(strlen("/data/local")+1);
!         fstrcpy(ptmp->pw_dir,"/data/local");
!         ptmp->pw_shell = (char *)malloc(strlen("/system/xbin/sh")+1);
!         fstrcpy(ptmp->pw_shell,"/system/xbin/sh");
!         return ptmp;    
  }
  
  struct passwd *sys_getpwuid(uid_t uid)
  {
! 	/*	return getpwuid(uid); */
! 	return sys_getpwnam("root");
  }
  
  struct group *sys_getgrnam(const char *name)
*** samba-3.0.20a/source/rpc_parse/parse_prs.c	Fri Sep 30 07:52:46 2005
--- samba-3.0.20a-jc/source/rpc_parse/parse_prs.c	Sun Oct 30 09:41:10 2011
***************
*** 55,63 ****
  	if (DEBUGLEVEL < 50) return;
  	for (i=1;i<100;i++) {
  		if (v != -1) {
! 			slprintf(fname,sizeof(fname)-1, "/tmp/%s_%d.%d.prs", name, v, i);
  		} else {
! 			slprintf(fname,sizeof(fname)-1, "/tmp/%s.%d.prs", name, i);
  		}
  		fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
  		if (fd != -1 || errno != EEXIST) break;
--- 55,63 ----
  	if (DEBUGLEVEL < 50) return;
  	for (i=1;i<100;i++) {
  		if (v != -1) {
! 			slprintf(fname,sizeof(fname)-1, "/data/data/com.funkyfresh.samba/files/var/tmp/%s_%d.%d.prs", name, v, i);
  		} else {
! 			slprintf(fname,sizeof(fname)-1, "/data/data/com.funkyfresh.samba/files/var/tmp/%s.%d.prs", name, i);
  		}
  		fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
  		if (fd != -1 || errno != EEXIST) break;
*** samba-3.0.20a/source/smbd/notify_kernel.c	Thu Jul 28 23:19:43 2005
--- samba-3.0.20a-jc/source/smbd/notify_kernel.c	Sun Oct 30 09:41:45 2011
***************
*** 198,204 ****
  static BOOL kernel_notify_available(void) 
  {
  	int fd, ret;
! 	fd = open("/tmp", O_RDONLY);
  	if (fd == -1)
  		return False; /* uggh! */
  	ret = sys_fcntl_long(fd, F_NOTIFY, 0);
--- 198,204 ----
  static BOOL kernel_notify_available(void) 
  {
  	int fd, ret;
! 	fd = open("/data/data/com.funkyfresh.samba/files/var/tmp", O_RDONLY);
  	if (fd == -1)
  		return False; /* uggh! */
  	ret = sys_fcntl_long(fd, F_NOTIFY, 0);
*** samba-3.0.20a/source/smbd/process.c	Fri Sep 30 07:52:41 2005
--- samba-3.0.20a-jc/source/smbd/process.c	Sun Oct 30 09:42:54 2011
***************
*** 841,847 ****
  
  	if (len < 4) len = smb_len(data)+4;
  	for (i=1;i<100;i++) {
! 		slprintf(fname,sizeof(fname)-1, "/tmp/%s.%d.%s", name, i,
  				type ? "req" : "resp");
  		fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
  		if (fd != -1 || errno != EEXIST) break;
--- 841,847 ----
  
  	if (len < 4) len = smb_len(data)+4;
  	for (i=1;i<100;i++) {
! 		slprintf(fname,sizeof(fname)-1, "/data/data/com.funkyfresh.samba/files/var/tmp/%s.%d.%s", name, i,
  				type ? "req" : "resp");
  		fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
  		if (fd != -1 || errno != EEXIST) break;
*** samba-3.0.20a/source/utils/net_rpc_samsync.c	Thu Jul 28 23:19:51 2005
--- samba-3.0.20a-jc/source/utils/net_rpc_samsync.c	Sun Oct 30 09:43:56 2011
***************
*** 1857,1863 ****
  	SAM_DELTA_HDR *hdr_deltas;
  	SAM_DELTA_CTR *deltas;
  	uint32 num_deltas;
! 	const char *add_ldif = "/tmp/add.ldif", *mod_ldif = "/tmp/mod.ldif";
  	FILE *add_fd, *mod_fd, *ldif_fd;
  	char sys_cmd[1024];
  	int num_alloced = 0, g_index = 0, a_index = 0;
--- 1857,1863 ----
  	SAM_DELTA_HDR *hdr_deltas;
  	SAM_DELTA_CTR *deltas;
  	uint32 num_deltas;
! 	const char *add_ldif = "/data/data/com.funkyfresh.samba/files/var/tmp/add.ldif", *mod_ldif = "/data/data/com.funkyfresh.samba/files/var/tmp/mod.ldif";
  	FILE *add_fd, *mod_fd, *ldif_fd;
  	char sys_cmd[1024];
  	int num_alloced = 0, g_index = 0, a_index = 0;
***************
*** 1878,1884 ****
  	if (user_file)
  		ldif_file = talloc_strdup(mem_ctx, user_file);
  	else
! 		ldif_file = talloc_strdup(mem_ctx, "/tmp/tmp.ldif");
  	
  	if (ldif_file == NULL)
  		return NT_STATUS_NO_MEMORY;
--- 1878,1884 ----
  	if (user_file)
  		ldif_file = talloc_strdup(mem_ctx, user_file);
  	else
! 		ldif_file = talloc_strdup(mem_ctx, "/data/data/com.funkyfresh.samba/files/var/tmp/tmp.ldif");
  	
  	if (ldif_file == NULL)
  		return NT_STATUS_NO_MEMORY;
***************
*** 2129,2135 ****
  	d_printf("net rpc vampire [ldif [<ldif-filename>] [options]\n"\
  		 "\t to pull accounts from a remote PDC where we are a BDC\n"\
  		 "\t\t no args puts accounts in local passdb from smb.conf\n"\
! 		 "\t\t ldif - put accounts in ldif format (file defaults to /tmp/tmp.ldif\n");
  
  	net_common_flags_usage(argc, argv);
  	return -1;
--- 2129,2135 ----
  	d_printf("net rpc vampire [ldif [<ldif-filename>] [options]\n"\
  		 "\t to pull accounts from a remote PDC where we are a BDC\n"\
  		 "\t\t no args puts accounts in local passdb from smb.conf\n"\
! 		 "\t\t ldif - put accounts in ldif format (file defaults to /data/data/com.funkyfresh.samba/files/var/tmp/tmp.ldif\n");
  
  	net_common_flags_usage(argc, argv);
  	return -1;
