~ubuntu-branches/ubuntu/intrepid/haproxy/intrepid

« back to all changes in this revision

Viewing changes to src/uri_auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-03-09 21:30:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080309213029-8oupnrc607mg5uqw
Tags: 1.3.14.3-1
* New Upstream Version
* Add status argument support to init-script to conform to LSB.
* Cleanup pidfile after stop in init script. Init script return code fixups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * URI-based user authentication using the HTTP basic method.
3
3
 *
4
 
 * Copyright 2006 Willy Tarreau <w@1wt.eu>
 
4
 * Copyright 2006-2007 Willy Tarreau <w@1wt.eu>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or
7
7
 * modify it under the terms of the GNU General Public License
114
114
}
115
115
 
116
116
/*
 
117
 * Returns a default uri_auth with the <refresh> refresh interval.
 
118
 * Uses the pointer provided if not NULL and not initialized.
 
119
 */
 
120
struct uri_auth *stats_set_refresh(struct uri_auth **root, int interval)
 
121
{
 
122
        struct uri_auth *u;
 
123
        
 
124
        if ((u = stats_check_init_uri_auth(root)) != NULL)
 
125
                u->refresh = interval;
 
126
        return u;
 
127
}
 
128
 
 
129
/*
 
130
 * Returns a default uri_auth with the <flag> set.
 
131
 * Uses the pointer provided if not NULL and not initialized.
 
132
 */
 
133
struct uri_auth *stats_set_flag(struct uri_auth **root, int flag)
 
134
{
 
135
        struct uri_auth *u;
 
136
        
 
137
        if ((u = stats_check_init_uri_auth(root)) != NULL)
 
138
                u->flags |= flag;
 
139
        return u;
 
140
}
 
141
 
 
142
/*
117
143
 * Returns a default uri_auth with a <user:passwd> entry added to the list of
118
144
 * authorized users. If a matching entry is found, no update will be performed.
119
145
 * Uses the pointer provided if not NULL and not initialized.
204
230
        return NULL;
205
231
}
206
232
 
 
233
/*
 
234
 * Local variables:
 
235
 *  c-indent-level: 8
 
236
 *  c-basic-offset: 8
 
237
 * End:
 
238
 */