summaryrefslogtreecommitdiffstats
path: root/kdeprint/cups/cupsdconf2
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
commit865f314dd5ed55508f45a32973b709b79a541e36 (patch)
treedc1a3a884bb2fc10a89a3c46313897d22c5771eb /kdeprint/cups/cupsdconf2
parentce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff)
downloadtdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz
tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip
kdelibs update to Trinity v3.5.11
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/cups/cupsdconf2')
-rw-r--r--kdeprint/cups/cupsdconf2/Makefile.am2
-rw-r--r--kdeprint/cups/cupsdconf2/cupsd.conf.template14
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.cpp6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.cpp11
4 files changed, 14 insertions, 19 deletions
diff --git a/kdeprint/cups/cupsdconf2/Makefile.am b/kdeprint/cups/cupsdconf2/Makefile.am
index 84c68ae98..58c83dc6d 100644
--- a/kdeprint/cups/cupsdconf2/Makefile.am
+++ b/kdeprint/cups/cupsdconf2/Makefile.am
@@ -15,7 +15,7 @@ cupsdconf_la_SOURCES = cupsdconf.cpp cupsddialog.cpp cupsdpage.cpp cupsdcomment.
qdirmultilineedit.cpp sizewidget.cpp main.cpp
cupsdconf_la_METASOURCES = AUTO
cupsdconf_la_LDFLAGS = -avoid-version -module $(all_libraries) $(KDE_RPATH)
-cupsdconf_la_LIBADD = $(LIB_KIO) $(LIB_CUPS)
+cupsdconf_la_LIBADD = $(LIB_KIO) $(LIB_CUPS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE)
noinst_HEADERS = cupsdconf.h cupsdpage.h cupsddialog.h cupsdcomment.h cupsdsplash.h \
cupsdserverpage.h cupsdlogpage.h cupsdjobspage.h cupsdfilterpage.h \
diff --git a/kdeprint/cups/cupsdconf2/cupsd.conf.template b/kdeprint/cups/cupsdconf2/cupsd.conf.template
index c91f0dfa3..ae1a4c362 100644
--- a/kdeprint/cups/cupsdconf2/cupsd.conf.template
+++ b/kdeprint/cups/cupsdconf2/cupsd.conf.template
@@ -100,9 +100,9 @@ $$
# The root directory for HTTP documents that are served.
# By default the compiled-in directory.</p>
# <p>
-# <i>ex</i>: /usr/share/cups/doc</p>
+# <i>ex</i>: /usr/share/cups/doc-root</p>
$$
-#DocumentRoot /usr/share/cups/doc
+#DocumentRoot /usr/share/cups/doc-root
@@
%%errorlog
@@ -272,12 +272,12 @@ $$
# <b>Group (Group)</b>
# <p>
# The group the server runs under. Normally this
-# must be <b>sys</b>, however you can configure things for another
+# must be <b>lpadmin</b>, however you can configure things for another
# group as needed.</p>
# <p>
-# <i>ex</i>: sys</p>
+# <i>ex</i>: lpadmin</p>
$$
-#Group sys
+#Group lpadmin
@@
%%ripcache
@@ -592,9 +592,9 @@ $$
# access. The default varies depending on the operating system, but
# will be <b>sys</b>, <b>system</b>, or <b>root</b> (checked for in that order).</p>
# <p>
-# <i>ex</i>: sys</p>
+# <i>ex</i>: lpadmin</p>
$$
-#SystemGroup sys
+#SystemGroup lpadmin
@@
%%servercertificate
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
index 4018ab2fb..1794d693d 100644
--- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
@@ -66,7 +66,7 @@ CupsdConf::CupsdConf()
<< "/usr/local/share/cups"
<< "/opt/share/cups"
<< "/opt/local/share/cups");
- documentdir_ = findDir(QStringList(datadir_+"/doc")
+ documentdir_ = findDir(QStringList(datadir_+"/doc-root")
<< datadir_.left(datadir_.length()-5)+"/doc/cups");
//fontpath_ << (datadir_+"/fonts");
requestdir_ = findDir(QStringList("/var/spool/cups")
@@ -90,7 +90,7 @@ CupsdConf::CupsdConf()
printcap_ = "/etc/printcap";
printcapformat_ = PRINTCAP_BSD;
remoteroot_ = "remroot";
- systemgroup_ = "sys";
+ systemgroup_ = "lpadmin";
encryptcert_ = serverfiles_+"/ssl/server.crt";
encryptkey_ = serverfiles_+"/ssl/server.key";
hostnamelookup_ = HOSTNAME_OFF;
@@ -115,7 +115,7 @@ CupsdConf::CupsdConf()
maxjobsperprinter_ = 0;
maxjobsperuser_ = 0;
user_ = "lp";
- group_ = "sys";
+ group_ = "lpadmin";
ripcache_ = "8m";
filterlimit_ = 0;
browsing_ = true;
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
index a70b5b59e..92f8eef51 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
@@ -206,14 +206,9 @@ bool CupsdDialog::restartServer(QString& msg)
else
{
bool success = false;
- if (getuid() == 0 )
- success = (::kill(serverPid, SIGHUP) == 0);
- else
- {
- KProcess proc;
- proc << "kdesu" << "-c" << "kill -SIGHUP " + QString::number( serverPid );
- success = proc.start( KProcess::Block ) && proc.normalExit();
- }
+ KProcess proc;
+ proc << "kdesu" << "-c" << "/etc/init.d/cupsys restart";
+ success = proc.start( KProcess::Block ) && proc.normalExit();
if( !success )
msg = i18n("Unable to restart CUPS server (pid = %1)").arg(serverPid);
}