Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37870379
en ru br
ALT Linux repositórios
S:1.3.59-alt4
5.0: 1.3.29-alt2
4.1: 1.3.29-alt2
4.0: 1.3.29-alt2
3.0: 1.2.24-alt5
+backports:1.3.29-alt0.M30.1

Group :: Sistema/Configurações/Boot e Init
RPM: chkconfig

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: chkconfig-1.2.24-alt-check-uid.patch
Download


diff -ur chkconfig-1.2.24~/chkconfig.c chkconfig-1.2.24/chkconfig.c
--- chkconfig-1.2.24~/chkconfig.c	Sat Dec 30 07:25:26 2000
+++ chkconfig-1.2.24/chkconfig.c	Sat Jan 26 19:32:02 2002
@@ -46,6 +46,11 @@
     glob_t globres;
     struct service s;
 
+    if (getuid()) {
+	fprintf(stderr, _("This function is available for root only.\n"));
+	return 1;
+    }
+
     if ((rc = readServiceInfo(name, &s, 0))) {
 	readServiceError(rc, name);
 	return 1;
@@ -65,6 +70,11 @@
 static int addService(char * name) {
     int i, rc;
     struct service s;
+
+    if (getuid()) {
+	fprintf(stderr, _("This function is available for root only.\n"));
+	return 1;
+    }
 
     if ((rc = readServiceInfo(name, &s, 0))) {
 	readServiceError(rc, name);
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009