Description: never allow launching of untrusted launchers. Implements the Ubuntu "Execute-Permission Bit Required" from https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission%20Bit%20Required Author: Kees Cook Index: nautilus-2.29.92.1/libnautilus-private/nautilus-mime-actions.c =================================================================== --- nautilus-2.29.92.1.orig/libnautilus-private/nautilus-mime-actions.c 2010-03-10 21:55:06.000000000 +0100 +++ nautilus-2.29.92.1/libnautilus-private/nautilus-mime-actions.c 2010-03-10 21:55:07.000000000 +0100 @@ -1672,12 +1672,14 @@ GTK_BUTTONS_NONE, primary, secondary); + if (nautilus_file_get_ctime(file) < 1256817600L ) { gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Launch Anyway"), RESPONSE_RUN); if (nautilus_file_can_set_permissions (file)) { gtk_dialog_add_button (GTK_DIALOG (dialog), _("Mark as _Trusted"), RESPONSE_MARK_TRUSTED); } + } gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); Index: nautilus-2.29.92.1/libnautilus-private/nautilus-file.c =================================================================== --- nautilus-2.29.92.1.orig/libnautilus-private/nautilus-file.c 2010-03-10 21:55:05.000000000 +0100 +++ nautilus-2.29.92.1/libnautilus-private/nautilus-file.c 2010-03-10 21:55:07.000000000 +0100 @@ -4860,6 +4860,12 @@ return file->details->mtime; } +time_t +nautilus_file_get_ctime (NautilusFile *file) +{ + return file->details->ctime; +} + static void set_attributes_get_info_callback (GObject *source_object, Index: nautilus-2.29.92.1/libnautilus-private/nautilus-file.h =================================================================== --- nautilus-2.29.92.1.orig/libnautilus-private/nautilus-file.h 2010-03-10 14:59:13.000000000 +0100 +++ nautilus-2.29.92.1/libnautilus-private/nautilus-file.h 2010-03-10 21:55:07.000000000 +0100 @@ -167,6 +167,7 @@ gboolean nautilus_file_can_get_size (NautilusFile *file); goffset nautilus_file_get_size (NautilusFile *file); time_t nautilus_file_get_mtime (NautilusFile *file); +time_t nautilus_file_get_ctime (NautilusFile *file); GFileType nautilus_file_get_file_type (NautilusFile *file); char * nautilus_file_get_mime_type (NautilusFile *file); gboolean nautilus_file_is_mime_type (NautilusFile *file,