Pièce jointe « auf_saml.patch »

Téléchargement

   1 Description: adaptations AUF pour support SAML
   2  Adaptations AUF pour support SAML dans Dovecot.
   3  .
   4  dovecot (1:2.2.13-11~bpo70+1~auf1) UNRELEASED; urgency=low
   5  .
   6    * Non-maintainer upload.
   7    * Increase Input buffer size (LOGIN_MAX_INBUF_SIZE by increasing MASTER_AUTH_MAX_DATA_SIZE) for pam-saml login
   8 Author: Moussa NOMBRÉ <moussa.nombre@auf.org>
   9 
  10 ---
  11 Origin: other
  12 Last-Update: 2015-08-21
  13 
  14 --- dovecot-2.2.13.orig/src/lib-master/master-auth.h
  15 +++ dovecot-2.2.13/src/lib-master/master-auth.h
  16 @@ -18,7 +18,7 @@ struct master_service;
  17     values may be max. 1024 bytes plus 2 for "" quotes. (Although it could be
  18     even double of that when value is full of \" quotes, but for now lets not
  19     make it too easy to waste memory..) */
  20 -#define MASTER_AUTH_MAX_DATA_SIZE (1024 + 128 + 33 + 2)
  21 +#define MASTER_AUTH_MAX_DATA_SIZE 4096
  22  
  23  #define MASTER_AUTH_ERRMSG_INTERNAL_FAILURE \
  24  	"Internal error occurred. Refer to server log for more information."
  25 --- dovecot-2.2.13.orig/src/lib/istream.h
  26 +++ dovecot-2.2.13/src/lib/istream.h
  27 @@ -85,6 +85,10 @@ void i_stream_set_init_buffer_size(struc
  28  /* Change the maximum size for stream's input buffer to grow. Useful only
  29     for buffered streams (currently only file). */
  30  void i_stream_set_max_buffer_size(struct istream *stream, size_t max_size);
  31 +/* Returns the current init buffer size. */
  32 +size_t i_stream_get_init_buffer_size(struct istream *stream);
  33 +/* Returns the current buffer size. */
  34 +size_t i_stream_get_buffer_size(struct istream *stream);
  35  /* Returns the current max. buffer size. */
  36  size_t i_stream_get_max_buffer_size(struct istream *stream);
  37  /* Enable/disable i_stream[_read]_next_line() returning the last line if it
  38 --- dovecot-2.2.13.orig/src/lib/istream.c
  39 +++ dovecot-2.2.13/src/lib/istream.c
  40 @@ -125,6 +125,16 @@ void i_stream_set_max_buffer_size(struct
  41  	io_stream_set_max_buffer_size(&stream->real_stream->iostream, max_size);
  42  }
  43  
  44 +size_t i_stream_get_init_buffer_size(struct istream *stream)
  45 +{
  46 +	return stream->real_stream->init_buffer_size;
  47 +}
  48 +
  49 +size_t i_stream_get_buffer_size(struct istream *stream)
  50 +{
  51 +	return stream->real_stream->buffer_size;
  52 +}
  53 +
  54  size_t i_stream_get_max_buffer_size(struct istream *stream)
  55  {
  56  	return stream->real_stream->max_buffer_size;
  57 --- dovecot-2.2.13.orig/src/login-common/client-common.c
  58 +++ dovecot-2.2.13/src/login-common/client-common.c
  59 @@ -24,6 +24,7 @@
  60  #include "client-common.h"
  61  
  62  #include <stdlib.h>
  63 +#include <stdio.h> // sprintf
  64  
  65  struct client *clients = NULL;
  66  static struct client *last_client = NULL;
  67 @@ -760,13 +761,18 @@ void client_send_raw(struct client *clie
  68  
  69  bool client_read(struct client *client)
  70  {
  71 +	char msg[1024];
  72  	switch (i_stream_read(client->input)) {
  73  	case -2:
  74  		/* buffer full */
  75  		client_notify_disconnect(client,
  76  			CLIENT_DISCONNECT_RESOURCE_CONSTRAINT,
  77  			"Input buffer full, aborting");
  78 -		client_destroy(client, "Disconnected: Input buffer full");
  79 +		sprintf(msg, "Disconnected: Input buffer full (init: %d, current: %d, max: %d)",
  80 +				i_stream_get_init_buffer_size(client->input),
  81 +				i_stream_get_buffer_size(client->input),
  82 +				i_stream_get_max_buffer_size(client->input) );
  83 +		client_destroy(client, msg);
  84  		return FALSE;
  85  	case -1:
  86  		/* disconnected */

Fichiers joints

Pour vous référer aux pièces jointes d'une page, utilisez attachment:filename, comme indiqué ci-dessous dans la liste de fichiers. N'utilisez pas l'URL du lien [get], car elle peut changer et donc être facilement cassée.
  • [télécharger | voir] (2015-08-21 21:39:45, 3.1 KB) [[attachment:auf_saml.patch]]
  • [télécharger | voir] (2013-04-08 13:34:23, 29.5 KB) [[attachment:lasso-export.diff]]
 All files | Selected Files: delete move to page copy to page

Vous n'êtes pas autorisé à joindre un fichier à cette page.