Verify TarWriter.TarEntry(fileName, entryName)
behavior if user owner and device numbers cannot be retrieved
#81144
Labels
Milestone
We fixed #81070 which was an issue in
TarWriter.WriteEntry(string fileName, string entryName)
where the method would crash if we attempted to add a file to an archive whose group owner name did not exist in the platform. This is the line that we fixed: TarWriter.Unix.cs#L85Need to verify these two other locations:
What if the user owner gets deleted from the system?: TarWriter.Unix.cs#L76. I don't know if Unix systems would change the user owner of files if that user gets deleted. Need to test it.
What if we have a problem retrieving device major and minor?: TarWriter.Unix.cs#L58. This case is probably fine to let it crash. If we are trying to add a block device or a character device, and we cannot retrieve its two essential numbers (device minor and minor), then it's probably ok to continue crashing.
The other two places in that same method that are ok to crash if they fail is when we do the
lstat
and when we create theFileStream
for a regular file.cc @jeffhandley
The text was updated successfully, but these errors were encountered: