Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Avoid getcwd calls
Vsevolod Stakhov committed 9 years ago
commit f5a8e7424eb487814081061d1b73f959bb2780f6
parent bd99521
5 files changed +7 -7
modified libpkg/pkg.c
@@ -1843,7 +1843,7 @@ pkg_message_from_str(struct pkg *pkg, const char *str, size_t len)
		len = strlen(str);
	}

-
	parser = ucl_parser_new(0);
+
	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);

	if (ucl_parser_add_chunk(parser, (const unsigned char*)str, len)) {
		obj = ucl_parser_get_object(parser);
modified libpkg/pkg_manifest.c
@@ -811,7 +811,7 @@ pkg_parse_manifest(struct pkg *pkg, char *buf, size_t len, struct pkg_manifest_k

	pkg_debug(2, "%s", "Parsing manifest from buffer");

-
	p = ucl_parser_new(0);
+
	p = ucl_parser_new(UCL_PARSER_NO_FILEVARS);
	if (!ucl_parser_add_chunk(p, buf, len)) {
		pkg_emit_error("Error parsing manifest: %s",
		    ucl_parser_get_error(p));
modified libpkg/pkg_ports.c
@@ -127,7 +127,7 @@ keyword_open_schema(void)
	if (keyword_schema != NULL)
		return (keyword_schema);

-
	parser = ucl_parser_new(0);
+
	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);
	if (!ucl_parser_add_chunk(parser, keyword_schema_str,
	    sizeof(keyword_schema_str) -1)) {
		pkg_emit_error("Cannot parse schema for keywords: %s",
@@ -965,7 +965,7 @@ external_keyword(struct plist *plist, char *keyword, char *line, struct file_att
		return (EPKG_UNKNOWN);
	}

-
	parser = ucl_parser_new(0);
+
	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);
	if (!ucl_parser_add_fd(parser, fd)) {
		pkg_emit_error("cannot parse keyword: %s",
				ucl_parser_get_error(parser));
modified libpkg/pkg_repo.c
@@ -772,7 +772,7 @@ pkg_repo_meta_extract_pubkey(int fd, void *ud)
	int64_t res_len = 0;
	bool found = false;

-
	parser = ucl_parser_new(0);
+
	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);
	if (!ucl_parser_add_chunk(parser, cbdata->map, cbdata->len)) {
		pkg_emit_error("cannot parse repository meta from %s",
				ucl_parser_get_error(parser));
@@ -1020,7 +1020,7 @@ pkg_repo_load_fingerprint(const char *dir, const char *filename)
		return (NULL);
	}

-
	p = ucl_parser_new(0);
+
	p = ucl_parser_new(UCL_PARSER_NO_FILEVARS);

	if (!ucl_parser_add_fd(p, fd)) {
		pkg_emit_error("cannot parse fingerprints: %s", ucl_parser_get_error(p));
modified libpkg/pkg_repo_meta.c
@@ -129,7 +129,7 @@ pkg_repo_meta_open_schema_v1()
	if (repo_meta_schema_v1 != NULL)
		return (repo_meta_schema_v1);

-
	parser = ucl_parser_new(0);
+
	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);
	if (!ucl_parser_add_chunk(parser, meta_schema_str_v1,
			sizeof(meta_schema_str_v1) - 1)) {
		pkg_emit_error("cannot parse schema for repo meta: %s",