mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
* g10.c (main): Try to use "gpg.conf" as default option file.
* openfile.c (copy_options_file): Changed name of created file.
This commit is contained in:
parent
181dcc69f4
commit
a1259acdcb
@ -1,3 +1,8 @@
|
|||||||
|
2002-08-06 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* g10.c (main): Try to use "gpg.conf" as default option file.
|
||||||
|
* openfile.c (copy_options_file): Changed name of created file.
|
||||||
|
|
||||||
2002-08-02 Werner Koch <wk@gnupg.org>
|
2002-08-02 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* Makefile.am (LDFLAGS): Removed DYNLINK_LDFLAGS.
|
* Makefile.am (LDFLAGS): Removed DYNLINK_LDFLAGS.
|
||||||
|
17
g10/g10.c
17
g10/g10.c
@ -979,8 +979,21 @@ main( int argc, char **argv )
|
|||||||
/* Okay, we are now working under our real uid */
|
/* Okay, we are now working under our real uid */
|
||||||
|
|
||||||
if( default_config )
|
if( default_config )
|
||||||
configname = make_filename(opt.homedir, "options", NULL );
|
{
|
||||||
|
configname = make_filename(opt.homedir, "gpg.conf", NULL );
|
||||||
|
if (!access (configname, R_OK))
|
||||||
|
{ /* Print a warning when both config files are present. */
|
||||||
|
char *p = make_filename(opt.homedir, "options", NULL );
|
||||||
|
if (!access (p, R_OK))
|
||||||
|
log_info (_("NOTE: old default options file `%s' ignored\n"), p);
|
||||||
|
m_free (p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ /* Keep on using the old default one. */
|
||||||
|
m_free (configname);
|
||||||
|
configname = make_filename(opt.homedir, "options", NULL );
|
||||||
|
}
|
||||||
|
}
|
||||||
argc = orig_argc;
|
argc = orig_argc;
|
||||||
argv = orig_argv;
|
argv = orig_argv;
|
||||||
pargs.argc = &argc;
|
pargs.argc = &argc;
|
||||||
|
@ -301,7 +301,7 @@ copy_options_file( const char *destdir )
|
|||||||
m_free(fname);
|
m_free(fname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strcpy(stpcpy(fname, destdir), DIRSEP_S "options" );
|
strcpy(stpcpy(fname, destdir), DIRSEP_S "gpg.conf" );
|
||||||
dst = fopen( fname, "w" );
|
dst = fopen( fname, "w" );
|
||||||
if( !dst ) {
|
if( !dst ) {
|
||||||
log_error(_("%s: can't create: %s\n"), fname, strerror(errno) );
|
log_error(_("%s: can't create: %s\n"), fname, strerror(errno) );
|
||||||
@ -320,7 +320,7 @@ copy_options_file( const char *destdir )
|
|||||||
}
|
}
|
||||||
fclose( dst );
|
fclose( dst );
|
||||||
fclose( src );
|
fclose( src );
|
||||||
log_info(_("%s: new options file created\n"), fname );
|
log_info(_("new configuration file `%s' created\n"), fname );
|
||||||
m_free(fname);
|
m_free(fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ try_make_homedir( const char *fname )
|
|||||||
log_info( _("%s: directory created\n"), fname );
|
log_info( _("%s: directory created\n"), fname );
|
||||||
copy_options_file( fname );
|
copy_options_file( fname );
|
||||||
log_info(_("you have to start GnuPG again, "
|
log_info(_("you have to start GnuPG again, "
|
||||||
"so it can read the new options file\n") );
|
"so it can read the new configuration file\n") );
|
||||||
g10_exit(1);
|
g10_exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user