X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fsrc%2Flsxid.c;h=bfcb47dbd81f75c9d45ca149ac83c89677821f8f;hb=a917f24ef7b003dcef54a3db2644cf9cb4bc2db2;hp=d6157b6898037e1c96479bdb53c3d145d16ea7d1;hpb=f7e2f88c9dfae9e3f41712dd9a29c1bcc56aed37;p=util-vserver.git diff --git a/util-vserver/src/lsxid.c b/util-vserver/src/lsxid.c index d6157b6..bfcb47d 100644 --- a/util-vserver/src/lsxid.c +++ b/util-vserver/src/lsxid.c @@ -124,21 +124,19 @@ lookupContext(xid_t xid) } static xid_t -getFileContext(char const *name, struct stat const *exp_st) +getFileContext(char const *name) { xid_t res; uint32_t mask = VC_IATTR_XID; - if (vc_get_iattr_compat(name, exp_st->st_dev, exp_st->st_ino, - &res, 0, &mask, &exp_st->st_mode)==-1) - perror("vc_get_iattr_compat()"); + if (vc_get_iattr(name, &res, 0, &mask)==-1) + perror("vc_get_iattr()"); return (mask&VC_IATTR_XID) ? res : VC_NOCTX; } bool -handleFile(char const *name, char const *display_name, - struct stat const *exp_st) +handleFile(char const *name, char const *display_name) { xid_t ctx = 0; char buf[MAX(sizeof(ctx)*3+1, 20)]; @@ -147,7 +145,7 @@ handleFile(char const *name, char const *display_name, memset(buf, ' ', sizeof buf); #if 1 - ctx = getFileContext(name, exp_st); + ctx = getFileContext(name); #else # warning Compiling in debug-code ctx = random() % 10 + 49213;