Project

General

Profile

Bug #982

zone_get_rootpath returns junk when run in NGZ

Added by Rich Lowe over 8 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
lib - userland libraries
Start date:
2011-05-02
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

When run in a non-global zone and given the name of the current zone as the zonename, zone_get_rootpath returns "//root". Probably zone_get_zonepath() returns "" (or "/"?), which is also wrong.

This is likely because the current zone exists in its own /etc/zones/index with a zonepath of '/' specified, which seems odd, given that that would be the zone root, not the zone path (which would be, in that model '/..', and inaccessible).

Using libzonecfg from within a zone is dubious in general, but it'd be better if things were to error rather than returning crap.

Also available in: Atom PDF