Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Printing
lprng
LPRng-3.8.28-tmpdir.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File LPRng-3.8.28-tmpdir.diff of Package lprng
--- src/common/linelist.c +++ src/common/linelist.c 2012-03-21 00:00:00.000000000 +0000 @@ -11,6 +11,7 @@ "$Id: linelist.c,v 1.74 2004/09/24 20:19:57 papowell Exp $"; #include "lp.h" +#include "defs.h" #include "errorcodes.h" #include "globmatch.h" #include "gethostinfo.h" @@ -2390,6 +2391,7 @@ void Filterprintcap( struct line_list *r /* do not worry if these fail */ close( intempfd); intempfd = -1; close( outtempfd); outtempfd = -1; + Remove_tempfiles(); } } @@ -2505,7 +2507,8 @@ char *Init_tempfile( void ) struct stat statb; if( Is_server ){ - if( dir == 0 ) dir = Spool_dir_DYN; + // only create tempfiles in spooldir when already expanded + if( (dir == 0) && safestrcmp(Spool_dir_DYN,SD_DEFAULT "/%P")) dir = Spool_dir_DYN; if( dir == 0 ) dir = Server_tmp_dir_DYN; } else { dir = getenv( "LPR_TMP" ); --- src/common/vars.c +++ src/common/vars.c 2008-02-28 15:51:15.000000000 +0000 @@ -200,7 +200,7 @@ struct keywords Pc_var_list[] = { /* default remote host */ { "default_remote_host", 0, STRING_K, &Default_remote_host_DYN,0,0,"=localhost"}, /* default temp directory for temp files */ -{ "default_tmp_dir", 0, STRING_K, &Default_tmp_dir_DYN,0,0,"=/tmp"}, +{ "default_tmp_dir", 0, STRING_K, &Default_tmp_dir_DYN,0,0,"=/var/tmp"}, /* printers that we should query for status information */ { "destinations", 0, STRING_K, &Destinations_DYN,0,0,0}, /* allow LPR to make direct socket connection to printer */ @@ -492,7 +492,7 @@ struct keywords Pc_var_list[] = { /* allow mail to user using the sendmail program */ { "sendmail_to_user", 0, FLAG_K, &Sendmail_to_user_DYN,0,0,"=1"}, /* server temporary file directory */ -{ "server_tmp_dir", 0, STRING_K, &Server_tmp_dir_DYN,0,0,"=/tmp"}, +{ "server_tmp_dir", 0, STRING_K, &Server_tmp_dir_DYN,0,0,"=/var/tmp"}, /* no form feed separator between job files */ { "sf", 0, FLAG_K, &No_FF_separator_DYN,0,0,"=1"}, /* suppress headers and/or banner page */ --- man/lpd.conf.n +++ man/lpd.conf.n 2008-02-28 15:48:44.000000000 +0000 @@ -237,8 +237,11 @@ This is also used as the job class. \fBdefault_remote_host\fR (default: "%H") The default remote host to use. .TP -\fBdefault_tmp_dir\fR (default: /tmp) +\fBdefault_tmp_dir\fR (default: /var/tmp) Directory for temporary files. +Must be on the same mounted filesystem as the spool directory +so that rename(2) can atomically replace files in the +spool directory with temporary files. .TP \fBdomain_name\fR (default: "") This parameter is optional, and is appended to @@ -565,8 +568,11 @@ accept the message on stdin, with \fIno\ The message will contain the \fBTo:\fR, \fBFrom:\fR, \fBCc:\fR and \fBSubject:\fR headers. .TP -\fBserver_tmp_dir\fR (default: /tmp) +\fBserver_tmp_dir\fR (default: /var/tmp) Temporary dir for the server. +Must be on the same mounted filesystem as the spool directory +so that rename(2) can atomically replace files in the +spool directory with temporary files. .TP \fBspool_dir_perms\fR (default: 042700) Permissions of the spool directories. --- man/printcap.n +++ man/printcap.n 2008-02-28 15:37:47.000000000 +0000 @@ -269,7 +269,7 @@ default_priority R str A default priority for printing jobs default_remote_host A str localhost default remote host for printing operations -default_tmp_dir A str /tmp +default_tmp_dir A str /var/tmp default temporary directory destinations D str NULL names of printers that lpq/lprm should talk to @@ -583,7 +583,7 @@ sendmail D str /usr/sbin/sendmail -oi -t server A bool false printcap entry for server only server_auth_command A str NULL authentication command for server program -server_tmp_dir D str /tmp +server_tmp_dir D str /var/tmp temporary directory for server to create files when there is no spool directory. server_user D str daemon server user name used in authentication operations
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor