smeserver-print-monitor/root/var/www/html/LPRng/admin/cgi-bin/suid.ph

28 lines
665 B
Perl

# 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;