Commit | Line | Data |
---|---|---|
59f0d218 FF |
1 | diff -u -r ../dpkg-1.17.10/src/archives.c ./src/archives.c |
2 | --- ../dpkg-1.17.10/src/archives.c 2014-06-05 19:56:33.000000000 +0200 | |
3 | +++ ./src/archives.c 2014-06-06 03:46:40.636882807 +0200 | |
4 | @@ -354,8 +354,10 @@ | |
5 | namenode->statoverride->uid, | |
6 | namenode->statoverride->gid, | |
7 | namenode->statoverride->mode); | |
8 | +#ifndef __ANDROID__ | |
9 | if (fchown(fd, st->uid, st->gid)) | |
10 | ohshite(_("error setting ownership of `%.255s'"), te->name); | |
11 | +#endif | |
12 | if (fchmod(fd, st->mode & ~S_IFMT)) | |
13 | ohshite(_("error setting permissions of `%.255s'"), te->name); | |
14 | ||
15 | @@ -468,11 +470,15 @@ | |
16 | return; /* Already handled using the file descriptor. */ | |
17 | ||
18 | if (te->type == TAR_FILETYPE_SYMLINK) { | |
19 | +#ifndef __ANDROID__ | |
20 | if (lchown(path, st->uid, st->gid)) | |
21 | ohshite(_("error setting ownership of symlink `%.255s'"), path); | |
22 | +#endif | |
23 | } else { | |
24 | +#ifndef __ANDROID__ | |
25 | if (chown(path, st->uid, st->gid)) | |
26 | ohshite(_("error setting ownership of `%.255s'"), path); | |
27 | +#endif | |
28 | if (chmod(path, st->mode & ~S_IFMT)) | |
29 | ohshite(_("error setting permissions of `%.255s'"), path); | |
30 | } | |
31 | @@ -1142,8 +1148,10 @@ | |
32 | varbuf_end_str(&symlinkfn); | |
33 | if (symlink(symlinkfn.buf,fnametmpvb.buf)) | |
34 | ohshite(_("unable to make backup symlink for `%.255s'"), ti->name); | |
35 | +#ifndef __ANDROID__ | |
36 | if (lchown(fnametmpvb.buf,stab.st_uid,stab.st_gid)) | |
37 | ohshite(_("unable to chown backup symlink for `%.255s'"), ti->name); | |
38 | +#endif | |
39 | tarobject_set_se_context(fnamevb.buf, fnametmpvb.buf, stab.st_mode); | |
40 | } else { | |
41 | debug(dbg_eachfiledetail, "tarobject nondirectory, 'link' backup"); |