Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 416361
Collapse All | Expand All

(-)a/restore/tape.c (-14 / +1 lines)
Lines 856-878 extractfile(struct entry *ep, int doremove) Link Here
856
		if (Nflag)
856
		if (Nflag)
857
			return (GOOD);
857
			return (GOOD);
858
		if (! (spcl.c_flags & DR_METAONLY)) {
858
		if (! (spcl.c_flags & DR_METAONLY)) {
859
			int sk;
859
			if (mknod(name, S_IFSOCK | 0600, 0) < 0) {
860
			struct sockaddr_un addr;
861
862
			if (uflag)
863
				(void)unlink(name);
864
865
			if ((sk = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) {
866
				warn("%s: cannot create socket", name);
867
				return (FAIL);
868
			}
869
			addr.sun_family = AF_UNIX;
870
			strcpy(addr.sun_path, name);
871
			if (bind(sk, (const struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0) {
872
				warn("%s: cannot create socket", name);
860
				warn("%s: cannot create socket", name);
873
				return (FAIL);
861
				return (FAIL);
874
			}
862
			}
875
			close(sk);
876
		}
863
		}
877
		if (chown(name, luid, lgid) < 0)
864
		if (chown(name, luid, lgid) < 0)
878
			warn("%s: chown", name);
865
			warn("%s: chown", name);

Return to bug 416361