File gnupg-accepts-path-separators-literal-data.patch of Package gpg2.42517

commit ad0c6c33c3d6fe7ff7cc8c2e73d02ead5788e5b3
Author: Werner Koch <wk@gnupg.org>
Date:   Mon Oct 27 12:43:27 2025 +0100

    gpg: Do not use a default when asking for another output filename.
    
    * g10/options.h (COMPAT_SUGGEST_EMBEDDED_NAME): New.
    * g10/gpg.c (compatibility_flags): New flags "suggest-embedded-name".
    * g10/openfile.c (ask_outfile_name): Do not show a default unless the
    compatibiliy flag is used.

Index: gnupg-2.0.24/g10/gpg.c
===================================================================
--- gnupg-2.0.24.orig/g10/gpg.c
+++ gnupg-2.0.24/g10/gpg.c
@@ -773,6 +773,7 @@ static ARGPARSE_OPTS opts[] = {
 static struct compatibility_flags_s compatibility_flags [] =
   {
     { COMPAT_ALLOW_NOT_DASH_ESCAPED, "allow-not-dash-escaped" },
+    { COMPAT_SUGGEST_EMBEDDED_NAME, "suggest-embedded-name" },
     { 0, NULL }
   };
 
Index: gnupg-2.0.24/g10/openfile.c
===================================================================
--- gnupg-2.0.24.orig/g10/openfile.c
+++ gnupg-2.0.24/g10/openfile.c
@@ -134,7 +134,7 @@ make_outfile_name( const char *iname )
    NAMELEN is its actual length.
  */
 char *
-ask_outfile_name( const char *name, size_t namelen )
+ask_outfile_name (const char *name, size_t namelen)
 {
   size_t n;
   const char *s;
Index: gnupg-2.0.24/g10/options.h
===================================================================
--- gnupg-2.0.24.orig/g10/options.h
+++ gnupg-2.0.24/g10/options.h
@@ -258,8 +258,7 @@ struct
   unsigned int compat_flags;
 } opt;
 
-/* Compatibility flags */
-/* #define COMPAT_FOO   1 */
+
 
 /* CTRL is used to keep some global variables we currently can't
    avoid.  Future concurrent versions of gpg will put it into a per
@@ -306,7 +305,14 @@ struct {
 EXTERN_UNLESS_MAIN_MODULE int memory_debug_mode;
 EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
 
+/* Compatibility flags */
+/* #define COMPAT_FOO   1 */
 #define COMPAT_ALLOW_NOT_DASH_ESCAPED 32 /* Handle NotDashEscaped header.  */
+#define COMPAT_SUGGEST_EMBEDDED_NAME 16 /* Show the non-signed
+                                         * embedded filename as
+                                         * suggestion.  */
+
+
 
 
 /* Compliance test macors.  */
openSUSE Build Service is sponsored by