CIFS system attributes support for cp(1), pack(1), unpack(1), compress(1) and uncompress(1) [PSARC/2007/432 FastTrack timeout 08/02/2007]
Basabi Bhattacharya
Basabi.Bhattacharya at sun.com
Fri Jul 27 15:35:34 PDT 2007
Hugh McIntyre wrote:
> Don Cragun wrote:
> > This case adds a new command line option '-/' to cp(1), pack(1), unpack(1),
> > compress(1) and uncompress(1) to support the extended system attributes
> > added in PSARC case 2007/315.
>
> Three or four questions:
>
> 1) What happens for "cp -p"? For the corresponding non-extended
> attribute option (@), the attributes get copied with just "cp -p"
> without you needing "cp -p@". Will extended attributes be handled the
> same way?
With the proposed chanages, "cp -p" will copy ACL, extended attributes and
extended system attributes. If the extended attribute has system attributes
associated with it, that are also copied.
>
> 2) For compress/uncompress and pack/unpack, why would you not want
> these extended attributes to always be preserved without needing to
> specify -/?
The reason was that most users won't have the privileges
needed to copy all of the extended system attributes and would,
therefore, fail when working with files that have extended system
attributes. To keep existing scripts working, we decided that a new
option was needed to explicitly ask for extended attributes when the
caller both needed to preserve them and expected to have the privileges
needed to do so.
This was discussed with the CIFS team and we all agreed on the new option.
>
> Put another way, with existing attributes, the two commands
> "compress foo ; uncompress foo.Z" will give you the original file back
> including ACLs and attributes (for fsattr-style attributes). It seems
> like at least some of the existing attributes would be things you'd want
> to be preserved by default, in much the same way as there's no "compress
> -p" option to preserve permissions because you just always want this.
>
> In the case of 2007/315 style attributes, the special meaning means
> that some attributes might want to always be preserved by default, while
> others might want to be always set or cleared. For example:
>
> - You might want to always preserve AV_QUARANTINED, if set.
>
> - AV_MODIFIED would presumably always want to be set unless someone uses
-/
>
> - for others such as HIDDEN, NODUMP, ARCHIVE, and probably others,
> there could be an argument that these should have their settings preserved.
>
> 3) Will you be attempting to get similar changes into gzip and bzip2?
No plan as of now.
>
> 4) What does Windows or MacOS do when copying files with attributes
> without special options? Should Solaris copy the same behaviour?
>
Windows tries to always preserve attributes when a file is copied.
Not sure about Mac.
Hope this addresses all your question.
Please let me know if there is any other question or issue with this case.
Thanks,
Basabi
******************************************************************
______
/_____/\ Basabi Bhattacharya
/_____\\ \
/_____\ \\ / Solaris Core OS - System Interface
/_____/ \/ / / MPK17-301, Office 3329
/_____/ / \//\ Sun Microsystems, Inc.
\_____\//\ / / Phone:650-786-4015/x84015
\_____/ / /\ /
\_____/ \\ \
\_____\ \\
\_____\/
********************************************************************
More information about the opensolaris-arc
mailing list