Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

uid/gid of the builder should not leak in the aci #16

Open
alban opened this issue Mar 12, 2015 · 4 comments
Open

uid/gid of the builder should not leak in the aci #16

alban opened this issue Mar 12, 2015 · 4 comments

Comments

@alban
Copy link
Member

alban commented Mar 12, 2015

After copying all necessary files in a temporary directory, goaci creates the tar archive with the following code:

err = filepath.Walk(acidir, aci.BuildWalker(acidir, iw))

aci.BuildWalker adds files in the tarball and preserves the uid/gid of the files. I am testing goaci as user alban and uid 1000 so the files copied by goaci in the temporary directory belong to 1000 and in files in the tar archive belong to 1000 (see populateHeaderUnix).

This goes against #10. I think we should just mark all files as belonging to root in the tar file. We can revisit this when appc/spec#231 gets fixed.

It might be possible to mark all files as belonging to root without patching aci.BuildWalker by adding an intermediary function call between Walk and BuildWalker which will provide a custom os.FileInfo.

(Issue discovered while reviewing #13)

@jonboulle
Copy link
Contributor

@alban ha, you discovered this a long time ago...

@jonboulle
Copy link
Contributor

Fixed by #24

@jonboulle
Copy link
Contributor

Oops, not actually fixed, silly me.

@alban
Copy link
Member Author

alban commented Sep 29, 2015

Oh, I knew there was a bug filed but I couldn't find it anymore...

/cc @iaguis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants