Loading cmds/installd/commands.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ dir_rec_t android_app_lib_dir; dir_rec_t android_media_dir; dir_rec_t android_media_dir; dir_rec_array_t android_system_dirs; dir_rec_array_t android_system_dirs; int install(const char *pkgname, uid_t uid, gid_t gid) int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo) { { char pkgdir[PKG_PATH_MAX]; char pkgdir[PKG_PATH_MAX]; char libsymlink[PKG_PATH_MAX]; char libsymlink[PKG_PATH_MAX]; Loading Loading @@ -91,7 +91,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid) return -1; return -1; } } if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) { ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); unlink(libsymlink); unlink(pkgdir); unlink(pkgdir); Loading cmds/installd/installd.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -31,7 +31,7 @@ static int do_ping(char **arg, char reply[REPLY_MAX]) static int do_install(char **arg, char reply[REPLY_MAX]) static int do_install(char **arg, char reply[REPLY_MAX]) { { return install(arg[0], atoi(arg[1]), atoi(arg[2])); /* pkgname, uid, gid */ return install(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3]); /* pkgname, uid, gid, seinfo */ } } static int do_dexopt(char **arg, char reply[REPLY_MAX]) static int do_dexopt(char **arg, char reply[REPLY_MAX]) Loading Loading @@ -129,7 +129,7 @@ struct cmdinfo { struct cmdinfo cmds[] = { struct cmdinfo cmds[] = { { "ping", 0, do_ping }, { "ping", 0, do_ping }, { "install", 3, do_install }, { "install", 4, do_install }, { "dexopt", 3, do_dexopt }, { "dexopt", 3, do_dexopt }, { "movedex", 2, do_move_dex }, { "movedex", 2, do_move_dex }, { "rmdex", 1, do_rm_dex }, { "rmdex", 1, do_rm_dex }, Loading cmds/installd/installd.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,7 @@ int ensure_media_user_dirs(userid_t userid); /* commands.c */ /* commands.c */ int install(const char *pkgname, uid_t uid, gid_t gid); int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo); int uninstall(const char *pkgname, uid_t persona); int uninstall(const char *pkgname, uid_t persona); int renamepkg(const char *oldpkgname, const char *newpkgname); int renamepkg(const char *oldpkgname, const char *newpkgname); int fix_uid(const char *pkgname, uid_t uid, gid_t gid); int fix_uid(const char *pkgname, uid_t uid, gid_t gid); Loading Loading
cmds/installd/commands.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ dir_rec_t android_app_lib_dir; dir_rec_t android_media_dir; dir_rec_t android_media_dir; dir_rec_array_t android_system_dirs; dir_rec_array_t android_system_dirs; int install(const char *pkgname, uid_t uid, gid_t gid) int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo) { { char pkgdir[PKG_PATH_MAX]; char pkgdir[PKG_PATH_MAX]; char libsymlink[PKG_PATH_MAX]; char libsymlink[PKG_PATH_MAX]; Loading Loading @@ -91,7 +91,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid) return -1; return -1; } } if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) { ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); unlink(libsymlink); unlink(pkgdir); unlink(pkgdir); Loading
cmds/installd/installd.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -31,7 +31,7 @@ static int do_ping(char **arg, char reply[REPLY_MAX]) static int do_install(char **arg, char reply[REPLY_MAX]) static int do_install(char **arg, char reply[REPLY_MAX]) { { return install(arg[0], atoi(arg[1]), atoi(arg[2])); /* pkgname, uid, gid */ return install(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3]); /* pkgname, uid, gid, seinfo */ } } static int do_dexopt(char **arg, char reply[REPLY_MAX]) static int do_dexopt(char **arg, char reply[REPLY_MAX]) Loading Loading @@ -129,7 +129,7 @@ struct cmdinfo { struct cmdinfo cmds[] = { struct cmdinfo cmds[] = { { "ping", 0, do_ping }, { "ping", 0, do_ping }, { "install", 3, do_install }, { "install", 4, do_install }, { "dexopt", 3, do_dexopt }, { "dexopt", 3, do_dexopt }, { "movedex", 2, do_move_dex }, { "movedex", 2, do_move_dex }, { "rmdex", 1, do_rm_dex }, { "rmdex", 1, do_rm_dex }, Loading
cmds/installd/installd.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,7 @@ int ensure_media_user_dirs(userid_t userid); /* commands.c */ /* commands.c */ int install(const char *pkgname, uid_t uid, gid_t gid); int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo); int uninstall(const char *pkgname, uid_t persona); int uninstall(const char *pkgname, uid_t persona); int renamepkg(const char *oldpkgname, const char *newpkgname); int renamepkg(const char *oldpkgname, const char *newpkgname); int fix_uid(const char *pkgname, uid_t uid, gid_t gid); int fix_uid(const char *pkgname, uid_t uid, gid_t gid); Loading