initial commit of file from CVS for smeserver-print-monitor on Sat Sep 7 20:55:37 AEST 2024
This commit is contained in:
27
root/var/www/html/LPRng/admin/cgi-bin/suid.ph
Normal file
27
root/var/www/html/LPRng/admin/cgi-bin/suid.ph
Normal file
@@ -0,0 +1,27 @@
|
||||
# suid.ph ... misc. stuff needed for setUID (be careful!) programs with LPRng lpinfo
|
||||
# Copyright 1997, 1998, 1999, 2000 by Alek Komarnitsky, alek@komar.org, http://www.komar.org/
|
||||
# Use and distribution of this software is covered by the GNU GPL license.
|
||||
# Please see the LICENSE file and http://www.gnu.org/
|
||||
|
||||
|
||||
$ENV{'PATH'} = "/bin:/usr/bin:/usr/ucb:/usr/etc";
|
||||
require Sys::Syslog;
|
||||
import Sys::Syslog;
|
||||
|
||||
$lpc = "/usr/sbin/lpc";
|
||||
$lprm = "/usr/bin/lprm";
|
||||
$nt_lpc = "c:\\ent\\util\\ntp\\release\\ntp.exe" ;
|
||||
$lprng_uid = "6743";
|
||||
$| = 1;
|
||||
|
||||
|
||||
sub sanitize {
|
||||
local ($OK_CHARS);
|
||||
$OK_CHARS=' \-\.a-zA-Z0-9_';
|
||||
s/[^$OK_CHARS]/_/go;
|
||||
/^(.*)$/;
|
||||
return $1;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user