~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_subr/config_file.c

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
/* File parsing context */
51
51
typedef struct parse_context_t
52
52
{
53
 
  /* This config struct and file */
 
53
  /* This config struct */
54
54
  svn_config_t *cfg;
55
 
  const char *file;
56
55
 
57
 
  /* The file descriptor */
 
56
  /* The stream struct */
58
57
  svn_stream_t *stream;
59
58
 
60
59
  /* The current line in the file */
61
60
  int line;
62
61
 
63
 
  /* Cached ungotten character  - streams don't support ungetc()
64
 
     [emulate it] */
 
62
  /* Emulate an ungetc */
65
63
  int ungotten_char;
66
 
  svn_boolean_t have_ungotten_char;
67
64
 
68
 
  /* Temporary strings, allocated from the temp pool */
 
65
  /* Temporary strings */
69
66
  svn_stringbuf_t *section;
70
67
  svn_stringbuf_t *option;
71
68
  svn_stringbuf_t *value;
 
69
 
 
70
  /* Parser buffer for getc() to avoid call overhead into several libraries
 
71
     for every character */
 
72
  char parser_buffer[SVN_STREAM_CHUNK_SIZE]; /* Larger than most config files */
 
73
  size_t buffer_pos; /* Current position within parser_buffer */
 
74
  size_t buffer_size; /* parser_buffer contains this many bytes */
72
75
} parse_context_t;
73
76
 
74
77
 
82
85
static APR_INLINE svn_error_t *
83
86
parser_getc(parse_context_t *ctx, int *c)
84
87
{
85
 
  if (ctx->have_ungotten_char)
86
 
    {
87
 
      *c = ctx->ungotten_char;
88
 
      ctx->have_ungotten_char = FALSE;
89
 
    }
90
 
  else
91
 
    {
92
 
      char char_buf;
93
 
      apr_size_t readlen = 1;
94
 
 
95
 
      SVN_ERR(svn_stream_read(ctx->stream, &char_buf, &readlen));
96
 
 
97
 
      if (readlen == 1)
98
 
        *c = char_buf;
 
88
  do
 
89
    {
 
90
      if (ctx->ungotten_char != EOF)
 
91
        {
 
92
          *c = ctx->ungotten_char;
 
93
          ctx->ungotten_char = EOF;
 
94
        }
 
95
      else if (ctx->buffer_pos < ctx->buffer_size)
 
96
        {
 
97
          *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos];
 
98
          ctx->buffer_pos++;
 
99
        }
99
100
      else
100
 
        *c = EOF;
 
101
        {
 
102
          ctx->buffer_pos = 0;
 
103
          ctx->buffer_size = sizeof(ctx->parser_buffer);
 
104
 
 
105
          SVN_ERR(svn_stream_read(ctx->stream, ctx->parser_buffer,
 
106
                                  &(ctx->buffer_size)));
 
107
 
 
108
          if (ctx->buffer_pos < ctx->buffer_size)
 
109
            {
 
110
              *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos];
 
111
              ctx->buffer_pos++;
 
112
            }
 
113
          else
 
114
            *c = EOF;
 
115
        }
101
116
    }
 
117
  while (*c == '\r');
102
118
 
103
119
  return SVN_NO_ERROR;
104
120
}
105
121
 
 
122
/* Simplified version of parser_getc() to be used inside skipping loops.
 
123
 * It will not check for 'ungotton' chars and may or may not ignore '\r'.
 
124
 *
 
125
 * In a 'while(cond) getc();' loop, the first iteration must call
 
126
 * parser_getc to handle all the special cases.  Later iterations should
 
127
 * use parser_getc_plain for maximum performance.
 
128
 */
 
129
static APR_INLINE svn_error_t *
 
130
parser_getc_plain(parse_context_t *ctx, int *c)
 
131
{
 
132
  if (ctx->buffer_pos < ctx->buffer_size)
 
133
    {
 
134
      *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos];
 
135
      ctx->buffer_pos++;
 
136
 
 
137
      return SVN_NO_ERROR;
 
138
    }
 
139
 
 
140
  return parser_getc(ctx, c);
 
141
}
 
142
 
106
143
/* Emulate ungetc() because streams don't support it.
107
144
 *
108
145
 * Use CTX to store the ungotten character C.
111
148
parser_ungetc(parse_context_t *ctx, int c)
112
149
{
113
150
  ctx->ungotten_char = c;
114
 
  ctx->have_ungotten_char = TRUE;
115
151
 
116
152
  return SVN_NO_ERROR;
117
153
}
123
159
static APR_INLINE svn_error_t *
124
160
skip_whitespace(parse_context_t *ctx, int *c, int *pcount)
125
161
{
126
 
  int ch;
 
162
  int ch = 0;
127
163
  int count = 0;
128
164
 
129
165
  SVN_ERR(parser_getc(ctx, &ch));
130
 
  while (ch != EOF && ch != '\n' && svn_ctype_isspace(ch))
 
166
  while (svn_ctype_isspace(ch) && ch != '\n' && ch != EOF)
131
167
    {
132
168
      ++count;
133
 
      SVN_ERR(parser_getc(ctx, &ch));
 
169
      SVN_ERR(parser_getc_plain(ctx, &ch));
134
170
    }
135
171
  *pcount = count;
136
172
  *c = ch;
146
182
  int ch;
147
183
 
148
184
  SVN_ERR(parser_getc(ctx, &ch));
149
 
  while (ch != EOF && ch != '\n')
150
 
    SVN_ERR(parser_getc(ctx, &ch));
 
185
  while (ch != '\n' && ch != EOF)
 
186
    SVN_ERR(parser_getc_plain(ctx, &ch));
151
187
 
152
188
  *c = ch;
153
189
  return SVN_NO_ERROR;
154
190
}
155
191
 
 
192
/* Skip a UTF-8 Byte Order Mark if found. */
 
193
static APR_INLINE svn_error_t *
 
194
skip_bom(parse_context_t *ctx)
 
195
{
 
196
  int ch;
 
197
 
 
198
  SVN_ERR(parser_getc(ctx, &ch));
 
199
  if (ch == 0xEF)
 
200
    {
 
201
      const unsigned char *buf = (unsigned char *)ctx->parser_buffer;
 
202
      /* This makes assumptions about the implementation of parser_getc and
 
203
       * the use of skip_bom.  Specifically that parser_getc() will get all
 
204
       * of the BOM characters into the parse_context_t buffer.  This can
 
205
       * safely be assumed as long as we only try to use skip_bom() at the
 
206
       * start of the stream and the buffer is longer than 3 characters. */
 
207
      SVN_ERR_ASSERT(ctx->buffer_size > ctx->buffer_pos + 1);
 
208
      if (buf[ctx->buffer_pos] == 0xBB && buf[ctx->buffer_pos + 1] == 0xBF)
 
209
        ctx->buffer_pos += 2;
 
210
      else
 
211
        SVN_ERR(parser_ungetc(ctx, ch));
 
212
    }
 
213
  else
 
214
    SVN_ERR(parser_ungetc(ctx, ch));
 
215
 
 
216
  return SVN_NO_ERROR;
 
217
}
156
218
 
157
219
/* Parse a single option value */
158
220
static svn_error_t *
241
303
 
242
304
/* Parse a single option */
243
305
static svn_error_t *
244
 
parse_option(int *pch, parse_context_t *ctx, apr_pool_t *pool)
 
306
parse_option(int *pch, parse_context_t *ctx, apr_pool_t *scratch_pool)
245
307
{
246
308
  svn_error_t *err = SVN_NO_ERROR;
247
309
  int ch;
259
321
    {
260
322
      ch = EOF;
261
323
      err = svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
262
 
                              "%s:%d: Option must end with ':' or '='",
263
 
                              svn_dirent_local_style(ctx->file, pool),
 
324
                              "line %d: Option must end with ':' or '='",
264
325
                              ctx->line);
265
326
    }
266
327
  else
284
345
 * starts a section name.
285
346
 */
286
347
static svn_error_t *
287
 
parse_section_name(int *pch, parse_context_t *ctx, apr_pool_t *pool)
 
348
parse_section_name(int *pch, parse_context_t *ctx,
 
349
                   apr_pool_t *scratch_pool)
288
350
{
289
351
  svn_error_t *err = SVN_NO_ERROR;
290
352
  int ch;
302
364
    {
303
365
      ch = EOF;
304
366
      err = svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
305
 
                              "%s:%d: Section header must end with ']'",
306
 
                              svn_dirent_local_style(ctx->file, pool),
 
367
                              "line %d: Section header must end with ']'",
307
368
                              ctx->line);
308
369
    }
309
370
  else
363
424
 
364
425
svn_error_t *
365
426
svn_config__parse_file(svn_config_t *cfg, const char *file,
366
 
                       svn_boolean_t must_exist, apr_pool_t *pool)
 
427
                       svn_boolean_t must_exist, apr_pool_t *result_pool)
367
428
{
368
429
  svn_error_t *err = SVN_NO_ERROR;
369
 
  parse_context_t ctx;
370
 
  int ch, count;
371
430
  svn_stream_t *stream;
 
431
  apr_pool_t *scratch_pool = svn_pool_create(result_pool);
372
432
 
373
 
  err = svn_stream_open_readonly(&stream, file, pool, pool);
 
433
  err = svn_stream_open_readonly(&stream, file, scratch_pool, scratch_pool);
374
434
 
375
435
  if (! must_exist && err && APR_STATUS_IS_ENOENT(err->apr_err))
376
436
    {
377
437
      svn_error_clear(err);
 
438
      svn_pool_destroy(scratch_pool);
378
439
      return SVN_NO_ERROR;
379
440
    }
380
441
  else
381
442
    SVN_ERR(err);
382
443
 
383
 
  ctx.cfg = cfg;
384
 
  ctx.file = file;
385
 
  ctx.stream = svn_subst_stream_translated(stream, "\n", TRUE, NULL, FALSE,
386
 
                                           pool);
387
 
  ctx.line = 1;
388
 
  ctx.have_ungotten_char = FALSE;
389
 
  ctx.section = svn_stringbuf_create("", pool);
390
 
  ctx.option = svn_stringbuf_create("", pool);
391
 
  ctx.value = svn_stringbuf_create("", pool);
 
444
  err = svn_config__parse_stream(cfg, stream, result_pool, scratch_pool);
 
445
 
 
446
  if (err != SVN_NO_ERROR)
 
447
    {
 
448
      /* Add the filename to the error stack. */
 
449
      err = svn_error_createf(err->apr_err, err,
 
450
                              "Error while parsing config file: %s:",
 
451
                              svn_dirent_local_style(file, scratch_pool));
 
452
    }
 
453
 
 
454
  /* Close the streams (and other cleanup): */
 
455
  svn_pool_destroy(scratch_pool);
 
456
 
 
457
  return err;
 
458
}
 
459
 
 
460
svn_error_t *
 
461
svn_config__parse_stream(svn_config_t *cfg, svn_stream_t *stream,
 
462
                         apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 
463
{
 
464
  parse_context_t *ctx;
 
465
  int ch, count;
 
466
 
 
467
  ctx = apr_palloc(scratch_pool, sizeof(*ctx));
 
468
 
 
469
  ctx->cfg = cfg;
 
470
  ctx->stream = stream;
 
471
  ctx->line = 1;
 
472
  ctx->ungotten_char = EOF;
 
473
  ctx->section = svn_stringbuf_create_empty(scratch_pool);
 
474
  ctx->option = svn_stringbuf_create_empty(scratch_pool);
 
475
  ctx->value = svn_stringbuf_create_empty(scratch_pool);
 
476
  ctx->buffer_pos = 0;
 
477
  ctx->buffer_size = 0;
 
478
 
 
479
  SVN_ERR(skip_bom(ctx));
392
480
 
393
481
  do
394
482
    {
395
 
      SVN_ERR(skip_whitespace(&ctx, &ch, &count));
 
483
      SVN_ERR(skip_whitespace(ctx, &ch, &count));
396
484
 
397
485
      switch (ch)
398
486
        {
399
487
        case '[':               /* Start of section header */
400
488
          if (count == 0)
401
 
            SVN_ERR(parse_section_name(&ch, &ctx, pool));
 
489
            SVN_ERR(parse_section_name(&ch, ctx, scratch_pool));
402
490
          else
403
491
            return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
404
 
                                     "%s:%d: Section header"
 
492
                                     "line %d: Section header"
405
493
                                     " must start in the first column",
406
 
                                     svn_dirent_local_style(file, pool),
407
 
                                     ctx.line);
 
494
                                     ctx->line);
408
495
          break;
409
496
 
410
497
        case '#':               /* Comment */
411
498
          if (count == 0)
412
499
            {
413
 
              SVN_ERR(skip_to_eoln(&ctx, &ch));
414
 
              ++ctx.line;
 
500
              SVN_ERR(skip_to_eoln(ctx, &ch));
 
501
              ++(ctx->line);
415
502
            }
416
503
          else
417
504
            return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
418
 
                                     "%s:%d: Comment"
 
505
                                     "line %d: Comment"
419
506
                                     " must start in the first column",
420
 
                                     svn_dirent_local_style(file, pool),
421
 
                                     ctx.line);
 
507
                                     ctx->line);
422
508
          break;
423
509
 
424
510
        case '\n':              /* Empty line */
425
 
          ++ctx.line;
 
511
          ++(ctx->line);
426
512
          break;
427
513
 
428
514
        case EOF:               /* End of file or read error */
429
515
          break;
430
516
 
431
517
        default:
432
 
          if (svn_stringbuf_isempty(ctx.section))
 
518
          if (svn_stringbuf_isempty(ctx->section))
433
519
            return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
434
 
                                     "%s:%d: Section header expected",
435
 
                                     svn_dirent_local_style(file, pool),
436
 
                                     ctx.line);
 
520
                                     "line %d: Section header expected",
 
521
                                     ctx->line);
437
522
          else if (count != 0)
438
523
            return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
439
 
                                     "%s:%d: Option expected",
440
 
                                     svn_dirent_local_style(file, pool),
441
 
                                     ctx.line);
 
524
                                     "line %d: Option expected",
 
525
                                     ctx->line);
442
526
          else
443
 
            SVN_ERR(parse_option(&ch, &ctx, pool));
 
527
            SVN_ERR(parse_option(&ch, ctx, scratch_pool));
444
528
          break;
445
529
        }
446
530
    }
447
531
  while (ch != EOF);
448
532
 
449
 
  /* Close the streams (and other cleanup): */
450
 
  return svn_stream_close(ctx.stream);
 
533
  return SVN_NO_ERROR;
451
534
}
452
535
 
453
536
 
748
831
        "###   http-timeout               Timeout for HTTP requests in seconds"
749
832
                                                                             NL
750
833
        "###   http-compression           Whether to compress HTTP requests" NL
 
834
        "###   http-max-connections       Maximum number of parallel server" NL
 
835
        "###                              connections to use for any given"  NL
 
836
        "###                              HTTP operation."                   NL
 
837
        "###   http-chunked-requests      Whether to use chunked transfer"   NL
 
838
        "###                              encoding for HTTP requests body."  NL
751
839
        "###   neon-debug-mask            Debug mask for Neon HTTP library"  NL
752
 
#ifdef SVN_NEON_0_26
753
 
        "###   http-auth-types            Auth types to use for HTTP library"NL
754
 
#endif
755
840
        "###   ssl-authority-files        List of files, each of a trusted CA"
756
841
                                                                             NL
757
842
        "###   ssl-trust-default-ca       Trust the system 'default' CAs"    NL
761
846
        "###   ssl-pkcs11-provider        Name of PKCS#11 provider to use."  NL
762
847
        "###   http-library               Which library to use for http/https"
763
848
                                                                             NL
764
 
        "###                              connections (neon or serf)"        NL
 
849
        "###                              connections."                      NL
 
850
        "###   http-bulk-updates          Whether to request bulk update"    NL
 
851
        "###                              responses or to fetch each file"   NL
 
852
        "###                              in an individual request. "        NL
765
853
        "###   store-passwords            Specifies whether passwords used"  NL
766
854
        "###                              to authenticate against a"         NL
767
855
        "###                              Subversion server may be cached"   NL
768
856
        "###                              to disk in any way."               NL
 
857
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
769
858
        "###   store-plaintext-passwords  Specifies whether passwords may"   NL
770
859
        "###                              be cached on disk unencrypted."    NL
 
860
#endif
771
861
        "###   store-ssl-client-cert-pp   Specifies whether passphrase used" NL
772
862
        "###                              to authenticate against a client"  NL
773
863
        "###                              certificate may be cached to disk" NL
774
864
        "###                              in any way"                        NL
 
865
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
775
866
        "###   store-ssl-client-cert-pp-plaintext"                           NL
776
867
        "###                              Specifies whether client cert"     NL
777
868
        "###                              passphrases may be cached on disk" NL
778
869
        "###                              unencrypted (i.e., as plaintext)." NL
 
870
#endif
779
871
        "###   store-auth-creds           Specifies whether any auth info"   NL
780
 
        "###                              (passwords as well as server certs)"
781
 
                                                                             NL
 
872
        "###                              (passwords, server certs, etc.)"   NL
782
873
        "###                              may be cached to disk."            NL
783
874
        "###   username                   Specifies the default username."   NL
784
875
        "###"                                                                NL
785
876
        "### Set store-passwords to 'no' to avoid storing passwords on disk" NL
786
 
        "### in any way, including in password stores. It defaults to 'yes',"
787
 
                                                                             NL
788
 
        "### but Subversion will never save your password to disk in plaintext"
789
 
                                                                             NL
790
 
        "### unless you tell it to."                                         NL
 
877
        "### in any way, including in password stores.  It defaults to"      NL
 
878
        "### 'yes', but Subversion will never save your password to disk in" NL
 
879
        "### plaintext unless explicitly configured to do so."               NL
791
880
        "### Note that this option only prevents saving of *new* passwords;" NL
792
881
        "### it doesn't invalidate existing passwords.  (To do that, remove" NL
793
882
        "### the cache files by hand as described in the Subversion book.)"  NL
794
883
        "###"                                                                NL
 
884
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
795
885
        "### Set store-plaintext-passwords to 'no' to avoid storing"         NL
796
886
        "### passwords in unencrypted form in the auth/ area of your config" NL
797
887
        "### directory. Set it to 'yes' to allow Subversion to store"        NL
801
891
        "### this option has no effect if either 'store-passwords' or "      NL
802
892
        "### 'store-auth-creds' is set to 'no'."                             NL
803
893
        "###"                                                                NL
 
894
#endif
804
895
        "### Set store-ssl-client-cert-pp to 'no' to avoid storing ssl"      NL
805
896
        "### client certificate passphrases in the auth/ area of your"       NL
806
897
        "### config directory.  It defaults to 'yes', but Subversion will"   NL
807
 
        "### never save your passphrase to disk in plaintext unless you tell"NL
808
 
        "### it to via 'store-ssl-client-cert-pp-plaintext' (see below)."    NL
 
898
        "### never save your passphrase to disk in plaintext unless"         NL
 
899
        "### explicitly configured to do so."                                NL
809
900
        "###"                                                                NL
810
901
        "### Note store-ssl-client-cert-pp only prevents the saving of *new*"NL
811
902
        "### passphrases; it doesn't invalidate existing passphrases.  To do"NL
814
905
        "###                    svn.serverconfig.netmodel.html\\"            NL
815
906
        "###                    #svn.serverconfig.netmodel.credcache"        NL
816
907
        "###"                                                                NL
 
908
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
817
909
        "### Set store-ssl-client-cert-pp-plaintext to 'no' to avoid storing"NL
818
910
        "### passphrases in unencrypted form in the auth/ area of your"      NL
819
911
        "### config directory.  Set it to 'yes' to allow Subversion to"      NL
823
915
        "### this option has no effect if either 'store-auth-creds' or "     NL
824
916
        "### 'store-ssl-client-cert-pp' is set to 'no'."                     NL
825
917
        "###"                                                                NL
 
918
#endif
826
919
        "### Set store-auth-creds to 'no' to avoid storing any Subversion"   NL
827
920
        "### credentials in the auth/ area of your config directory."        NL
828
921
        "### Note that this includes SSL server certificates."               NL
833
926
        "### HTTP timeouts, if given, are specified in seconds.  A timeout"  NL
834
927
        "### of 0, i.e. zero, causes a builtin default to be used."          NL
835
928
        "###"                                                                NL
 
929
        "### Most users will not need to explicitly set the http-library"    NL
 
930
        "### option, but valid values for the option include:"               NL
 
931
        "###    'serf': Serf-based module (Subversion 1.5 - present)"        NL
 
932
        "###    'neon': Neon-based module (Subversion 1.0 - 1.7)"            NL
 
933
        "### Availability of these modules may depend on your specific"      NL
 
934
        "### Subversion distribution."                                       NL
 
935
        "###"                                                                NL
836
936
        "### The commented-out examples below are intended only to"          NL
837
937
        "### demonstrate how to use this file; any resemblance to actual"    NL
838
938
        "### servers, living or dead, is entirely coincidental."             NL
854
954
        "# http-proxy-username = blah"                                       NL
855
955
        "# http-proxy-password = doubleblah"                                 NL
856
956
        "# http-timeout = 60"                                                NL
857
 
#ifdef SVN_NEON_0_26
858
 
        "# http-auth-types = basic;digest;negotiate"                         NL
859
 
#endif
860
957
        "# neon-debug-mask = 130"                                            NL
 
958
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
861
959
        "# store-plaintext-passwords = no"                                   NL
 
960
#endif
862
961
        "# username = harry"                                                 NL
863
962
        ""                                                                   NL
864
963
        "### Information for the second group:"                              NL
895
994
        "# http-proxy-username = defaultusername"                            NL
896
995
        "# http-proxy-password = defaultpassword"                            NL
897
996
        "# http-compression = no"                                            NL
898
 
#ifdef SVN_NEON_0_26
899
 
        "# http-auth-types = basic;digest;negotiate"                         NL
900
 
#endif
901
997
        "# No http-timeout, so just use the builtin default."                NL
902
998
        "# No neon-debug-mask, so neon debugging is disabled."               NL
903
999
        "# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem"   NL
904
1000
        "#"                                                                  NL
905
1001
        "# Password / passphrase caching parameters:"                        NL
906
1002
        "# store-passwords = no"                                             NL
907
 
        "# store-plaintext-passwords = no"                                   NL
908
1003
        "# store-ssl-client-cert-pp = no"                                    NL
909
 
        "# store-ssl-client-cert-pp-plaintext = no"                          NL;
 
1004
#ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE
 
1005
        "# store-plaintext-passwords = no"                                   NL
 
1006
        "# store-ssl-client-cert-pp-plaintext = no"                          NL
 
1007
#endif
 
1008
        ;
910
1009
 
911
1010
      err = svn_io_file_open(&f, path,
912
1011
                             (APR_WRITE | APR_CREATE | APR_EXCL),
954
1053
        "### Valid password stores:"                                         NL
955
1054
        "###   gnome-keyring        (Unix-like systems)"                     NL
956
1055
        "###   kwallet              (Unix-like systems)"                     NL
 
1056
        "###   gpg-agent            (Unix-like systems)"                     NL
957
1057
        "###   keychain             (Mac OS X)"                              NL
958
1058
        "###   windows-cryptoapi    (Windows)"                               NL
959
1059
#ifdef SVN_HAVE_KEYCHAIN_SERVICES
961
1061
#elif defined(WIN32) && !defined(__MINGW32__)
962
1062
        "# password-stores = windows-cryptoapi"                              NL
963
1063
#else
964
 
        "# password-stores = gnome-keyring,kwallet"                          NL
 
1064
        "# password-stores = gpg-agent,gnome-keyring,kwallet"                NL
965
1065
#endif
966
1066
        "### To disable all password stores, use an empty list:"             NL
967
1067
        "# password-stores ="                                                NL
976
1076
        "# kwallet-svn-application-name-with-pid = yes"                      NL
977
1077
#endif
978
1078
        "###"                                                                NL
 
1079
        "### Set ssl-client-cert-file-prompt to 'yes' to cause the client"   NL
 
1080
        "### to prompt for a path to a client cert file when the server"     NL
 
1081
        "### requests a client cert but no client cert file is found in the" NL
 
1082
        "### expected place (see the 'ssl-client-cert-file' option in the"   NL
 
1083
        "### 'servers' configuration file). Defaults to 'no'."               NL
 
1084
        "# ssl-client-cert-file-prompt = no"                                 NL
 
1085
        "###"                                                                NL
979
1086
        "### The rest of the [auth] section in this file has been deprecated."
980
1087
                                                                             NL
981
1088
        "### Both 'store-passwords' and 'store-auth-creds' can now be"       NL
1038
1145
        "### path separator.  A single backslash will be treated as an"      NL
1039
1146
        "### escape for the following character."                            NL
1040
1147
        ""                                                                   NL
1041
 
        "### Section for configuring miscelleneous Subversion options."      NL
 
1148
        "### Section for configuring miscellaneous Subversion options."      NL
1042
1149
        "[miscellany]"                                                       NL
1043
1150
        "### Set global-ignores to a set of whitespace-delimited globs"      NL
1044
1151
        "### which Subversion will ignore in its 'status' output, and"       NL
1095
1202
        "# *.png = svn:mime-type=image/png"                                  NL
1096
1203
        "# *.jpg = svn:mime-type=image/jpeg"                                 NL
1097
1204
        "# Makefile = svn:eol-style=native"                                  NL
1098
 
        ""                                                                   NL;
 
1205
        ""                                                                   NL
 
1206
        "### Section for configuring working copies."                        NL
 
1207
        "[working-copy]"                                                     NL
 
1208
        "### Set to a list of the names of specific clients that should use" NL
 
1209
        "### exclusive SQLite locking of working copies.  This increases the"NL
 
1210
        "### performance of the client but prevents concurrent access by"    NL
 
1211
        "### other clients.  Third-party clients may also support this"      NL
 
1212
        "### option."                                                        NL
 
1213
        "### Possible values:"                                               NL
 
1214
        "###   svn                (the command line client)"                 NL
 
1215
        "# exclusive-locking-clients ="                                      NL
 
1216
        "### Set to true to enable exclusive SQLite locking of working"      NL
 
1217
        "### copies by all clients using the 1.8 APIs.  Enabling this may"   NL
 
1218
        "### cause some clients to fail to work properly. This does not have"NL
 
1219
        "### to be set for exclusive-locking-clients to work."               NL
 
1220
        "# exclusive-locking = false"                                        NL;
1099
1221
 
1100
1222
      err = svn_io_file_open(&f, path,
1101
1223
                             (APR_WRITE | APR_CREATE | APR_EXCL),