bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vms uid handlng for tar 1.19


From: John E. Malmberg
Subject: vms uid handlng for tar 1.19
Date: Fri, 07 Mar 2008 00:11:33 -0600
User-agent: Mozilla/5.0 (X11; U; OpenVMS AlphaServer_DS10_617_MHz; en-US; rv:1.7) Gecko/20040621

The next test for me to get working is options.at.

The issue is that the VMS UID is 32 bits with the GID encoded in it, unless special mapping is in place.

So to encode the UID in uid_to_chars(), the value needed is (uid >> 16) unless the special mapping is in place, in which case the UID would be passed unchanged.

If I put a wrapper on stat() to return a shifted UID, that UID would not be usable on other calls like getpwuid(). And this could cause problems for other uses of st_uid

So I am looking for a solution that is a bit more elegant, but it looks like the simplest thing to do is put a wrapper on deref_stat() when called by the create module to do the uid conversion if needed.

I have not seen if this may have other side effects.

This also raises the issue of restoring a file with the original UID that was stored.

In this case the UID is constructed by multiplying the stored UID * 0x10000 + the UID.

I can easily put wrappers chown and lchown to do the conversion when needed, so that is not as big of an issue.

-John
address@hidden
Personal Opinion Only





reply via email to

[Prev in Thread] Current Thread [Next in Thread]