svn commit: samba r2193 - in trunk/source: param printing

jerry at samba.org jerry at samba.org
Thu Sep 2 22:13:12 GMT 2004


Author: jerry
Date: 2004-09-02 22:13:11 +0000 (Thu, 02 Sep 2004)
New Revision: 2193

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source&rev=2193&nolog=1

Log:
merge winbind enable local accounts and printing fixes from 3.0
Modified:
   trunk/source/param/loadparm.c
   trunk/source/printing/printing.c


Changeset:
Modified: trunk/source/param/loadparm.c
===================================================================
--- trunk/source/param/loadparm.c	2004-09-02 21:55:24 UTC (rev 2192)
+++ trunk/source/param/loadparm.c	2004-09-02 22:13:11 UTC (rev 2193)
@@ -1535,7 +1535,7 @@
 	string_set(&Globals.szCupsServer, "");
 
 	Globals.winbind_cache_time = 300;	/* 5 minutes */
-	Globals.bWinbindEnableLocalAccounts = True;
+	Globals.bWinbindEnableLocalAccounts = False;
 	Globals.bWinbindEnumUsers = True;
 	Globals.bWinbindEnumGroups = True;
 	Globals.bWinbindUseDefaultDomain = False;

Modified: trunk/source/printing/printing.c
===================================================================
--- trunk/source/printing/printing.c	2004-09-02 21:55:24 UTC (rev 2192)
+++ trunk/source/printing/printing.c	2004-09-02 22:13:11 UTC (rev 2193)
@@ -159,8 +159,6 @@
 	tdb_delete(rap_tdb, data);
 }
 
-static pid_t local_pid;
-
 static int get_queue_status(const char *printer_name, print_status_struct *);
 
 /****************************************************************************
@@ -174,15 +172,10 @@
 	int services = lp_numservices();
 	int snum;
 
-	if (local_pid == sys_getpid())
-		return True;
-
 	unlink(lock_path("printing.tdb"));
 	pstrcpy(printing_path,lock_path("printing"));
 	mkdir(printing_path,0755);
 
-	local_pid = sys_getpid();
-
 	/* handle a Samba upgrade */
 
 	for (snum = 0; snum < services; snum++) {
@@ -609,6 +602,7 @@
 	/* Remove from printing.tdb */
 
 	tdb_delete(pdb->tdb, print_key(jobid));
+	remove_from_jobs_changed(snum, jobid);
 	release_print_db(pdb);
 	rap_jobid_delete(snum, jobid);
 }
@@ -1482,7 +1476,7 @@
 	if (!pjob)
 		return -1;
 	/* don't allow another process to get this info - it is meaningless */
-	if (pjob->pid != local_pid)
+	if (pjob->pid != sys_getpid())
 		return -1;
 	return pjob->fd;
 }
@@ -1497,7 +1491,7 @@
 {
 	struct printjob *pjob = print_job_find(lp_const_servicename(snum),
 					       jobid);
-	if (!pjob || pjob->spooled || pjob->pid != local_pid)
+	if (!pjob || pjob->spooled || pjob->pid != sys_getpid())
 		return NULL;
 	return pjob->filename;
 }
@@ -1538,7 +1532,7 @@
 {
 	struct printjob *pjob = print_job_find(lp_const_servicename(snum),
 					       jobid);
-	if (!pjob || pjob->pid != local_pid)
+	if (!pjob || pjob->pid != sys_getpid())
 		return False;
 
 	fstrcpy(pjob->jobname, name);
@@ -1635,8 +1629,6 @@
 
 	if (pjob->spooled && pjob->sysjob != -1)
 		result = (*(current_printif->job_delete))(snum, pjob);
-	else
-		remove_from_jobs_changed(lp_const_servicename(snum), jobid);
 
 	/* Delete the tdb entry if the delete succeeded or the job hasn't
 	   been spooled. */
@@ -1855,7 +1847,7 @@
 	if (!pjob)
 		return -1;
 	/* don't allow another process to get this info - it is meaningless */
-	if (pjob->pid != local_pid)
+	if (pjob->pid != sys_getpid())
 		return -1;
 
 	return_code = write(pjob->fd, buf, size);
@@ -2120,7 +2112,7 @@
 	
 	ZERO_STRUCT(pjob);
 	
-	pjob.pid = local_pid;
+	pjob.pid = sys_getpid();
 	pjob.sysjob = -1;
 	pjob.fd = -1;
 	pjob.starttime = time(NULL);
@@ -2191,7 +2183,7 @@
 	if (!pjob)
 		return;
 	/* don't allow another process to get this info - it is meaningless */
-	if (pjob->pid != local_pid)
+	if (pjob->pid != sys_getpid())
 		return;
 
 	pjob->page_count++;
@@ -2215,7 +2207,7 @@
 	if (!pjob)
 		return False;
 
-	if (pjob->spooled || pjob->pid != local_pid)
+	if (pjob->spooled || pjob->pid != sys_getpid())
 		return False;
 
 	if (normal_close && (sys_fstat(pjob->fd, &sbuf) == 0)) {
@@ -2271,7 +2263,6 @@
 	/* Still need to add proper error return propagation! 010122:JRR */
 	unlink(pjob->filename);
 	pjob_delete(snum, lp_const_servicename(snum), jobid);
-	remove_from_jobs_changed(lp_const_servicename(snum), jobid);
 	return False;
 }
 



More information about the samba-cvs mailing list