Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37550003
en ru br
ALT Linux repositórios
S:9.16.44-alt1
5.0: 9.3.6-alt5
4.1: 9.3.6-alt4.M41.2
+updates:9.3.6-alt4.M41.1
4.0: 9.3.6-alt4.M41.1
+updates:9.3.6-alt4.M41.1
3.0: 9.2.4.rel-alt2

Group :: Sistema/Servidores
RPM: bind

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: bind-9.2.4rc5-owl-checkconf_chroot.patch
Download


diff -uprk.orig bind-9.2.4rc5.orig/bin/check/named-checkconf.8 bind-9.2.4rc5/bin/check/named-checkconf.8
--- bind-9.2.4rc5.orig/bin/check/named-checkconf.8	2004-06-03 09:21:07 +0400
+++ bind-9.2.4rc5/bin/check/named-checkconf.8	2004-06-30 18:26:49 +0400
@@ -31,6 +31,7 @@ the semantics, of a named configuration 
 chroot to \fIdirectory\fR so that include
 directives in the configuration file are processed as if
 run by a similarly chrooted named.
+By default, \fBnamed-checkconf\fR \fBchroot()\fR's to \fI@ROOT@\fR.
 .TP
 \fB-v\fR
 Print the version of the \fBnamed-checkconf\fR
diff -uprk.orig bind-9.2.4rc5.orig/bin/check/named-checkconf.c bind-9.2.4rc5/bin/check/named-checkconf.c
--- bind-9.2.4rc5.orig/bin/check/named-checkconf.c	2004-03-09 09:09:09 +0300
+++ bind-9.2.4rc5/bin/check/named-checkconf.c	2004-06-30 18:26:49 +0400
@@ -78,22 +78,12 @@ main(int argc, char **argv) {
 	isc_mem_t *mctx = NULL;
 	isc_result_t result;
 	int exit_status = 0;
+	const char *chroot_dir = "@ROOT@";
 
 	while ((c = isc_commandline_parse(argc, argv, "t:v")) != EOF) {
 		switch (c) {
 		case 't':
-			result = isc_dir_chroot(isc_commandline_argument);
-			if (result != ISC_R_SUCCESS) {
-				fprintf(stderr, "isc_dir_chroot: %s\n",
-					isc_result_totext(result));
-				exit(1);
-			}
-			result = isc_dir_chdir("/");
-			if (result != ISC_R_SUCCESS) {
-				fprintf(stderr, "isc_dir_chdir: %s\n",
-					isc_result_totext(result));
-				exit(1);
-			}
+			chroot_dir = isc_commandline_argument;
 			break;
 
 		case 'v':
@@ -104,6 +94,18 @@ main(int argc, char **argv) {
 			usage();
 		}
 	}
+	result = isc_dir_chroot(chroot_dir);
+	if (result != ISC_R_SUCCESS) {
+		fprintf(stderr, "isc_dir_chroot: %s\n",
+			isc_result_totext(result));
+		exit(1);
+	}
+	result = isc_dir_chdir("/");
+	if (result != ISC_R_SUCCESS) {
+		fprintf(stderr, "isc_dir_chdir: %s\n",
+			isc_result_totext(result));
+		exit(1);
+	}
 
 	if (argv[isc_commandline_index] != NULL)
 		conffile = argv[isc_commandline_index];
 
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