diff -Nru xdiagnose-2.5.2/bin/xdiagnose xdiagnose-2.5.3/bin/xdiagnose --- xdiagnose-2.5.2/bin/xdiagnose 2012-03-17 02:37:34.000000000 +0000 +++ xdiagnose-2.5.3/bin/xdiagnose 2013-04-23 22:14:38.000000000 +0000 @@ -59,6 +59,10 @@ sys.stderr.write("Could not open X display\n") sys.exit(1) + if os.getenv("USER") != "root": + sys.stderr.write("Error: Must run as superuser\n") + sys.exit(2) + # Run the application. if options.failure_to_start: app = XDiagnose() diff -Nru xdiagnose-2.5.2/debian/changelog xdiagnose-2.5.3/debian/changelog --- xdiagnose-2.5.2/debian/changelog 2012-06-27 17:32:25.000000000 +0000 +++ xdiagnose-2.5.3/debian/changelog 2013-04-23 22:14:04.000000000 +0000 @@ -1,3 +1,22 @@ +xdiagnose (2.5.3) precise-proposed; urgency=low + + * bin/xdiagnose: Exit with error if run as non-root. Otherwise, the + program will crash when it tries to write a new grub configuration. + (LP: #769419) + + -- Bryce Harrington Tue, 23 Apr 2013 15:13:13 -0700 + +xdiagnose (2.5.2ubuntu0.1) precise-security; urgency=low + + * SECURITY UPDATE: fix insecure temporary file creation + - xdiagnose/welcome.py: remove 'Archive' option and on_make_archive() + as people should be using 'ubuntu-bug xorg' anyway. Patch thanks + to Bryce Harrington. + - CVE-2012-XXXX + - LP: #1036211 + + -- Jamie Strandboge Mon, 01 Oct 2012 17:04:28 -0500 + xdiagnose (2.5.2) precise-proposed; urgency=low * apport/source_xorg.py: diff -Nru xdiagnose-2.5.2/xdiagnose/welcome.py xdiagnose-2.5.3/xdiagnose/welcome.py --- xdiagnose-2.5.2/xdiagnose/welcome.py 2012-03-17 02:23:56.000000000 +0000 +++ xdiagnose-2.5.3/xdiagnose/welcome.py 2012-10-01 22:04:16.000000000 +0000 @@ -113,9 +113,6 @@ button3 = self.create_button("Edit X Config", "Edit xorg.conf configuration file") button3.connect("clicked", self.on_edit_file, "/etc/X11/xorg.conf") - button4 = self.create_button("Archive", - "Package up configuration and logs for sharing") - button4.connect("clicked", self.on_make_archive) table = gtk.Table(rows=4, columns=3, homogeneous=False) table.set_border_width(0) @@ -199,21 +196,6 @@ pass execute("zenity --text-info --editable --filename=%s --width=640 --height=480" %(self.xorg_conf_path)) - def on_make_archive(self, widget): - xorg_backup_name = "failsafeX-backup-${timestamp}" - xorg_backup_dir = "/tmp" # TODO: $(mktemp -d -t ${xorg_backup_name}.XXX) - xorg_backup_file = "/var/log/%s.tar" %(xorg_backup_name) - - shutils.copy("/etc/X11/xorg.conf", xorg_backup_dir) - shutils.copy("/var/log/Xorg.0.log", xorg_backup_dir) - shutils.copy("/var/log/Xorg.0.log.old", xorg_backup_dir) - shutils.copytree("/var/log/gdm", xorg_backup_dir) - shutils.copytree("/var/log/lightdm", xorg_backup_dir) - execute("lspci -vvnn > %s/lspci-vvnn.txt" %(xorg_backup_dir)) - execute("xrandr --verbose > %s/xrandr-verbose.txt" %(xorg_backup_dir)) - execute("tar -cf %s %s" %(xorg_backup_file, xorg_backup_dir)) - shutils.rmtree(xorg_backup_dir) - if __name__ == "__main__": import sys