I will quickly point out what needs to be fixed:
This is where you did your HACK:
filesystem/common/funcs.sh: # Adds ‘osmc’ to sudoers with no password prompt
filesystem/common/funcs.sh: mkdir -p ${1}/etc/sudoers.d
filesystem/common/funcs.sh: echo “osmc ALL= NOPASSWD: ALL” >${1}/etc/sudoers.d/osmc-no-sudo-password
filesystem/common/funcs.sh: echo “Defaults !secure_path” >${1}/etc/sudoers.d/osmc-no-secure-path
filesystem/common/funcs.sh: chmod 0440 ${1}/etc/sudoers.d/osmc-no-sudo-password
filesystem/common/funcs.sh: chmod 0440 ${1}/etc/sudoers.d/osmc-no-secure-path
These are the root issues which need to be fixed:
package/mediacenter-osmc/patches/all-040-Ensure-that-Kodi-devicename-reflects-etc-hostname.patch:+ system("/usr/bin/sudo /bin/mv /tmp/hostname /etc/hostname");
package/mediacenter-osmc/patches/all-040-Ensure-that-Kodi-devicename-reflects-etc-hostname.patch:+ system("/usr/bin/sudo /bin/hostname -F /etc/hostname");
package/mediacenter-osmc/patches/rbp1-watchdog: sudo -u osmc $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
package/mediacenter-osmc/patches/vero2-watchdog: sudo -u osmc $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
package/mediacenter-osmc/patches/vero-watchdog: sudo -u osmc $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
package/mediacenter-osmc/patches/all-007-sync-timezone-from-mediacenter.patch:+ int res = system("/usr/bin/sudo /bin/mv /tmp/timezone /etc/timezone"); /* We need this to update a root owned file /
package/mediacenter-osmc/patches/all-007-sync-timezone-from-mediacenter.patch:+ asprintf(&command, “%s%s%s”, “/usr/bin/sudo /bin/cp /usr/share/zoneinfo/”, timezoneName.c_str(), " /etc/localtime.dpkg-new");
package/mediacenter-osmc/patches/all-007-sync-timezone-from-mediacenter.patch:+ system("/usr/bin/sudo /bin/mv /etc/localtime.dpkg-new /etc/localtime");
package/mediacenter-osmc/patches/vero2-057-add-reboot-to-android-option.patch:+ os.system("/usr/bin/sudo /sbin/reboot androidv2")
package/mediacenter-osmc/patches/rbp2-watchdog: sudo -u osmc $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
package/mediacenter-osmc/patches/atv-watchdog: sudo -u osmc xinit $KODI --standalone -fs --lircdev /var/run/lirc/lircd; CODE="$?"
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: subprocess.call([“sudo”, “mv”, ‘/var/tmp/blacklist-rc6.conf’, self.rc6_file_loc])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: subprocess.call([“sudo”, “rm”, “-f”, self.rc6_file])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: subprocess.call([‘sudo’, ‘ln’, ‘-sf’, self.remote_selection, LIRCD_PATH])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: subprocess.call([‘sudo’, ‘ln’, ‘-sf’, original_target, LIRCD_PATH])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: subprocess.call([‘sudo’, ‘systemctl’, ‘restart’, 'lircd_helper@’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.remotes/resources/lib/remote_gui.py: proc = subprocess.Popen([‘sudo’, ‘systemctl’, ‘restart’, 'lircd_helper@’])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_walkthru.py: os.system("/bin/sudo /bin/systemctl disable ssh")
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_walkthru.py: os.system("/bin/sudo /bin/systemctl stop ssh")
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_walkthru.py: subprocess.call([‘sudo’, ‘rm’, ‘/tmp/NO_UPDATE’])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_ubiquifonts.py: subprocess.call([“sudo”, “cp”, os.path.join(FONT_FOLDER, filename), alien_fonts_folder])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_ubiquifonts.py: subprocess.call([“sudo”, “cp”, alien_font_xml, backup_file])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_ubiquifonts.py: subprocess.call([“sudo”, “mv”, ‘/tmp/Font.xml’, alien_font_xml])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_main.py: subprocess.call([‘sudo’, ‘mv’, ‘/tmp/walkthrough_completed’, ‘/walkthrough_completed’])
package/mediacenter-addon-osmc/src/service.osmc.settings/resources/lib/osmc_comms.py: subprocess.call([‘sudo’, ‘rm’, self.address])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/osmc_advset_editor.py: subprocess.call([‘sudo’, ‘cp’, loc, loc.replace(‘advancedsettings.xml’, ‘advancedsettings_backup.xml’)])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/osmc_advset_editor.py: subprocess.call([‘sudo’, ‘rm’, ‘-f’, loc])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/networking_gui.py: res = subprocess.check_call([‘sudo’, ‘chmod’, ‘777’, loc])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/osmc_systemd.py: subprocess.call([‘sudo’, ‘/bin/systemctl’, service_status, service_name])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/osmc_network.py: subprocess.call([‘sudo’, ‘mv’, ‘/tmp/cmdline.txt’, file_path])
package/mediacenter-addon-osmc/src/script.module.osmccommon/resources/lib/grablogs.py: ‘actn’: ‘sudo journalctl’,
package/mediacenter-addon-osmc/src/script.module.osmccommon/resources/lib/grablogs.py: os.popen(‘sudo cp -rf %s /boot/’ % TEMP_LOG_FILE)
package/mediacenter-addon-osmc/src/script.module.osmccommon/resources/lib/grablogs.py: os.popen(‘sudo cp -rf %s /boot/’ % TEMP_LOG_FILE)
package/mediacenter-addon-osmc/src/script.module.osmccommon/resources/lib/osmc_comms.py: subprocess.call([‘sudo’, ‘rm’, self.address])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.logging/resources/lib/grablogs.py: ‘actn’: ‘sudo journalctl’,
package/mediacenter-addon-osmc/src/script.module.osmcsetting.logging/resources/lib/grablogs.py: os.popen(‘sudo cp -rf %s /boot/’ % TEMP_LOG_FILE)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.logging/resources/lib/grablogs.py: os.popen(‘sudo cp -rf %s /boot/’ % TEMP_LOG_FILE)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/OSMC_Backups.py: subprocess.Popen([‘sudo’, ‘mv’, location, ‘/etc’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/OSMC_Backups.py: res = subprocess.call([“sudo”, “mv”, ‘/tmp/fstab’, ‘/etc/fstab’ ])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: external scripts from the command line using sudo. The other script communicates with the update service using a socket file.
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘systemctl’, ‘start’, ‘manual-update’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘python’,’%s/apt_cache_action.py’ % libpath, action])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘python’,’%s/apt_cache_action.py’ % libpath, ‘action_list’, action])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘systemctl’, ‘restart’, ‘mediacenter’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘systemctl’, ‘start’, ‘manual-update’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: os.system(‘sudo apt-cache clean’)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/update_service.py: subprocess.Popen([‘sudo’, ‘apt-get’, ‘autoremove’, ‘&&’, ‘apt-get’, ‘clean’])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/comms.py: subprocess.call([‘sudo’, ‘rm’, self.address])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/OSMC_HotFix.py: os.popen(‘sudo cp -rf %s /boot/’ % self.tmp_hfo_location)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: os.system("sudo /bin/systemctl enable " + service)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: os.system("sudo /bin/systemctl start " + service)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: os.system("sudo /bin/systemctl disable " + service)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: os.system("sudo /bin/systemctl stop " + service)
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: p = subprocess.call([“sudo”, “/bin/systemctl”, “is-active”, service])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.services/resources/lib/service_selection_gui.py: p = subprocess.call([“sudo”, “/bin/systemctl”, “is-enabled”, service])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pioverclock/resources/osmc/OSMCSetting.py: subprocess.call([“sudo”, “mv”, ‘/var/tmp/config.txt’, config_location])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pi/resources/lib/config_editor.py: subprocess.call([“sudo”, “cp”, self.config, ‘/home/pi/’ ])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pi/resources/lib/config_editor.py: subprocess.call([“sudo”, “mv”, ‘/home/pi/config.txt’, ‘/home/pi/config’ + suffix + ‘.txt’ ])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pi/resources/lib/config_editor.py: subprocess.call([“sudo”, “mv”, tmp_loc, self.config ])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pi/resources/osmc/OSMCSetting.py: subprocess.call([“sudo”, “mv”, ‘/var/tmp/config.txt’, self.config_location])
package/mediacenter-addon-osmc/src/script.module.osmcsetting.pi/resources/osmc/OSMCSetting.py: subprocess.call([“sudo”, “mv”, ‘/var/tmp/config.txt’, self.config_location])
package/diskmount-osmc/files/lib/systemd/system/udisks-glue.service:ExecStartPre = /bin/bash -c "sudo rmdir /media// 2>/dev/null; time udevadm settle; exit 0"
package/diskmount-osmc/files/etc/udisks-glue.conf: if sudo /usr/bin/net usershare add “$(basename “%mount_point”)” “%mount_point” “Auto-mount Volume” “$(hostname)\osmc:f”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /usr/bin/net usershare delete “$(basename “%mount_point”)”
package/diskmount-osmc/files/etc/udisks-glue.conf: if sudo /usr/bin/net usershare add “$(basename “%mount_point”)” “%mount_point” “Auto-mount Volume” “$(hostname)\osmc:f”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /usr/bin/net usershare delete “$(basename “%mount_point”)”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo chmod a+rwx “%mount_point” 2>/dev/null
package/diskmount-osmc/files/etc/udisks-glue.conf: if sudo /usr/bin/net usershare add “$(basename “%mount_point”)” “%mount_point” “Auto-mount Volume” “$(hostname)\osmc:f”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /usr/bin/net usershare delete “$(basename “%mount_point”)”
package/diskmount-osmc/files/etc/udisks-glue.conf: if sudo /usr/bin/net usershare add “$(basename “%mount_point”)” “%mount_point” “Auto-mount Volume” “$(hostname)\osmc:r”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /usr/bin/net usershare delete “$(basename “%mount_point”)”
package/diskmount-osmc/files/etc/udisks-glue.conf: if sudo /usr/bin/net usershare add “$(basename “%mount_point”)” “%mount_point” “Auto-mount Volume” “$(hostname)\osmc:r”
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /usr/bin/net usershare delete “$(basename “%mount_point”)”
package/diskmount-osmc/files/etc/udisks-glue.conf: echo 1024 | sudo tee “/sys/dev/block/$device/queue/read_ahead_kb” > /dev/null
package/diskmount-osmc/files/etc/udisks-glue.conf: sudo /sbin/hdparm -S 240 %device_file
package/base-files-osmc/files/etc/profile.d/101-apt-update.sh: sudo apt-get update >/dev/null 2>&1
package/base-files-osmc/files/etc/profile.d/103-generate-locale.sh: sudo sed -e “s/# $LANG/$LANG/” -i /etc/locale.gen
package/base-files-osmc/files/etc/profile.d/103-generate-locale.sh: sudo /usr/sbin/locale-gen ${LANG}
package/base-files-osmc/files/usr/bin/apt-get:# even with our sudo preservation hack, we can’t set this up as a profile.d function and export it
results where found by running:
egrep -R sudo * 2>/dev/null | grep -v Pesudo | grep -v psudo | grep -v build.sh | grep -v Makefile | grep -v README | grep -v Depends | grep -vi Jenkins | grep -v prerm | grep -v toolchain | grep -v kernel | grep -v installer | grep -v backports