tar_hdr
tlm_tar_hdr_t *tar_hdr;
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr)
tar_hdr->th_linkflag = LF_ACL;
(void) strlcpy(tar_hdr->th_name, "UFSACL", TLM_NAME_SIZE);
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size), "%011o ",
(void) snprintf(tar_hdr->th_mode, sizeof (tar_hdr->th_mode), "%06o ",
(void) snprintf(tar_hdr->th_uid, sizeof (tar_hdr->th_uid), "%06o ", 0);
(void) snprintf(tar_hdr->th_gid, sizeof (tar_hdr->th_gid), "%06o ", 0);
(void) snprintf(tar_hdr->th_mtime, sizeof (tar_hdr->th_mtime),
(void) strlcpy(tar_hdr->th_magic, TLM_MAGIC,
sizeof (tar_hdr->th_magic));
tlm_build_header_checksum(tar_hdr);
tlm_tar_hdr_t *tar_hdr;
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr) {
tar_hdr->th_linkflag = LF_HUMONGUS;
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size), "%011o ",
tlm_build_header_checksum(tar_hdr);
tlm_tar_hdr_t *tar_hdr;
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr) {
(void) strlcpy(tar_hdr->th_name, section_name, TLM_NAME_SIZE);
tar_hdr->th_linkflag = LF_XATTR;
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size), "%011o ",
(void) snprintf(tar_hdr->th_mode, sizeof (tar_hdr->th_mode), "%06o ",
(void) snprintf(tar_hdr->th_uid, sizeof (tar_hdr->th_uid), "%06o ",
(void) snprintf(tar_hdr->th_gid, sizeof (tar_hdr->th_gid), "%06o ",
(void) snprintf(tar_hdr->th_mtime, sizeof (tar_hdr->th_mtime), "%011o ",
(void) strlcpy(tar_hdr->th_magic, TLM_MAGIC,
sizeof (tar_hdr->th_magic));
tlm_build_header_checksum(tar_hdr);
tlm_tar_hdr_t *tar_hdr;
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr) {
(void) snprintf(tar_hdr->th_name,
sizeof (tar_hdr->th_name),
tar_hdr->th_linkflag = LF_LONGNAME;
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size),
(void) snprintf(tar_hdr->th_mode, sizeof (tar_hdr->th_mode),
(void) snprintf(tar_hdr->th_uid, sizeof (tar_hdr->th_uid),
(void) snprintf(tar_hdr->th_gid, sizeof (tar_hdr->th_gid),
(void) snprintf(tar_hdr->th_uname, sizeof (tar_hdr->th_uname),
(void) snprintf(tar_hdr->th_gname, sizeof (tar_hdr->th_gname),
(void) snprintf(tar_hdr->th_mtime, sizeof (tar_hdr->th_mtime),
(void) strlcpy(tar_hdr->th_magic, TLM_MAGIC,
sizeof (tar_hdr->th_magic));
tlm_build_header_checksum(tar_hdr);
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr) {
(void) snprintf(tar_hdr->th_linkname,
sizeof (tar_hdr->th_name),
tar_hdr->th_linkflag = LF_LONGLINK;
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size),
(void) snprintf(tar_hdr->th_mode, sizeof (tar_hdr->th_mode),
(void) snprintf(tar_hdr->th_uid, sizeof (tar_hdr->th_uid),
(void) snprintf(tar_hdr->th_gid, sizeof (tar_hdr->th_gid),
(void) snprintf(tar_hdr->th_uname, sizeof (tar_hdr->th_uname),
(void) snprintf(tar_hdr->th_gname, sizeof (tar_hdr->th_gname),
(void) snprintf(tar_hdr->th_mtime, sizeof (tar_hdr->th_mtime),
(void) strlcpy(tar_hdr->th_magic, TLM_MAGIC,
sizeof (tar_hdr->th_magic));
tlm_build_header_checksum(tar_hdr);
tar_hdr = (tlm_tar_hdr_t *)get_write_buffer(RECORDSIZE,
if (!tar_hdr) {
(void) snprintf(tar_hdr->th_name,
sizeof (tar_hdr->th_name),
(void) strlcpy(tar_hdr->th_name, section_name, TLM_NAME_SIZE);
(void) snprintf(tar_hdr->th_linkname,
sizeof (tar_hdr->th_name),
(void) strlcpy(tar_hdr->th_linkname, link, TLM_NAME_SIZE);
tar_hdr->th_linkflag = LF_DIR;
tar_hdr->th_linkflag = LF_FIFO;
tar_hdr->th_linkflag = LF_BLK;
tar_hdr->th_linkflag = LF_CHR;
(void) snprintf(tar_hdr->th_shared.th_dev.th_devmajor,
sizeof (tar_hdr->th_shared.th_dev.th_devmajor), "%06o ",
(void) snprintf(tar_hdr->th_shared.th_dev.th_devminor,
sizeof (tar_hdr->th_shared.th_dev.th_devminor), "%06o ",
tar_hdr->th_linkflag = LF_LINK;
(void) snprintf(tar_hdr->th_shared.th_hlink_ino,
sizeof (tar_hdr->th_shared.th_hlink_ino),
tar_hdr->th_linkflag = *link == 0 ? LF_NORMAL :
tar_hdr->th_linkflag);
(void) snprintf(tar_hdr->th_size, sizeof (tar_hdr->th_size), "%011o ",
(void) snprintf(tar_hdr->th_mode, sizeof (tar_hdr->th_mode), "%06o ",
(void) snprintf(tar_hdr->th_uid, sizeof (tar_hdr->th_uid), "%06o ",
(void) snprintf(tar_hdr->th_gid, sizeof (tar_hdr->th_gid), "%06o ",
(void) snprintf(tar_hdr->th_uname, sizeof (tar_hdr->th_uname), "%.31s",
(void) snprintf(tar_hdr->th_gname, sizeof (tar_hdr->th_gname), "%.31s",
(void) snprintf(tar_hdr->th_mtime, sizeof (tar_hdr->th_mtime), "%011o ",
(void) strlcpy(tar_hdr->th_magic, TLM_MAGIC,
sizeof (tar_hdr->th_magic));
tlm_build_header_checksum(tar_hdr);
tlm_vfy_tar_checksum(tlm_tar_hdr_t *tar_hdr)
int chksum = oct_atoi(tar_hdr->th_chksum);
uchar_t *p = (uchar_t *)tar_hdr;
sum -= 0xFF & tar_hdr->th_chksum[i];
tlm_tar_hdr_t *tar_hdr;
tar_hdr = (tlm_tar_hdr_t *)get_read_buffer(sizeof (*tar_hdr),
if (tar_hdr == NULL || error != 0) {
acls->acl_attr.st_mode = oct_atoi(tar_hdr->th_mode);
acls->acl_attr.st_size = oct_atoi(tar_hdr->th_size);
acls->acl_attr.st_uid = oct_atoi(tar_hdr->th_uid);
acls->acl_attr.st_gid = oct_atoi(tar_hdr->th_gid);
acls->acl_attr.st_mtime = oct_atoi(tar_hdr->th_mtime);
tlm_tar_hdr_t *tar_hdr;
tar_hdr = &fake_tar_hdr;
tar_hdr->th_linkflag = last_action;
tar_hdr = (tlm_tar_hdr_t *)get_read_buffer(want,
if (tar_hdr == NULL) {
chk_rv = tlm_vfy_tar_checksum(tar_hdr);
if (tar_hdr->th_linkflag != LF_MULTIVOL &&
tar_hdr->th_linkflag != LF_VOLHDR) {
if (tar_hdr->th_linkflag != LF_HUMONGUS) {
oct_atoi(tar_hdr->th_mode);
oct_atoi(tar_hdr->th_size);
oct_atoi(tar_hdr->th_uid);
oct_atoi(tar_hdr->th_gid);
oct_atoi(tar_hdr->th_mtime);
tar_hdr->th_uname,
tar_hdr->th_gname,
file_size = oct_atoi(tar_hdr->th_size);
last_action = tar_hdr->th_linkflag;
tar_hdr->th_name, tar_hdr->th_linkflag,
tar_hdr->th_linkflag != LF_XATTR)
rs_create_new_bkpath(bk_path, tar_hdr->th_name, thname_buf);
switch (tar_hdr->th_linkflag) {
oct_atoi(tar_hdr->th_shared.th_hlink_ino);
if (tar_hdr->th_name[0] == 0) {
if (tar_hdr->th_name[0] != '/') {
tar_hdr->th_name,
if (DAR && (tar_hdr->th_linkflag == LF_LINK)) {
tar_hdr->th_linkname : longlink;
tar_hdr->th_linkflag, nmp, acls,
oct_atoi(tar_hdr->th_shared.
oct_atoi(tar_hdr->th_shared.
if (DAR && tar_hdr->th_linkflag != LF_ACL &&
tar_hdr->th_linkflag != LF_XATTR &&