Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37414080
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.3.6-owl-checkconf-chroot.patch
Download


--- bind/bin/check/named-checkconf.8
+++ bind/bin/check/named-checkconf.8
@@ -45,6 +45,7 @@ checks the syntax, but not the semantics, of a named configuration file.
 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 will \fBchroot()\fR to \fI@ROOT@\fR.
 .RE
 .PP
 \-v
--- bind/bin/check/named-checkconf.c
+++ bind/bin/check/named-checkconf.c
@@ -208,6 +208,7 @@ main(int argc, char **argv) {
 	int exit_status = 0;
 	isc_entropy_t *ectx = NULL;
 	isc_boolean_t load_zones = ISC_FALSE;
+	const char *chroot_dir = "@ROOT@";
 	
 	while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) {
 		switch (c) {
@@ -220,18 +221,7 @@ main(int argc, char **argv) {
 			break;
 
 		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':
@@ -247,6 +237,19 @@ main(int argc, char **argv) {
 		}
 	}
 
+	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];
 	if (conffile == NULL || conffile[0] == '\0')
 
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