~ubuntu-branches/ubuntu/oneiric/openvpn/oneiric

« back to all changes in this revision

Viewing changes to misc.h

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2008-10-07 16:30:44 UTC
  • mfrom: (1.1.11 upstream) (10.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081007163044-ixx04wg588z1972e
Tags: 2.1~rc11-1ubuntu1
* Merge with Debian (LP: #279655), remaining diffs:
  - debian/openvpn.init.d: Added 'status' action to init script, show
    per-VPN result messages and add "--script-security 2" by default for
    backwards compatibility
  - debian/control: Added lsb-base>=3.2-14 depend to allow status_of_proc()
* Fixes regression when calling commands with arguments (LP: #277447)

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
/* return true if pathname is absolute */
222
222
bool absolute_pathname (const char *pathname);
223
223
 
224
 
/* return the next largest power of 2 */
225
 
unsigned int adjust_power_of_2 (unsigned int u);
226
 
 
227
224
/*
228
225
 * Get and store a username/password
229
226
 */
300
297
#define SSEC_PW_ENV    3 /* allow calling of built-in programs and user-defined scripts that may receive a password as an environmental variable */
301
298
extern int script_security; /* GLOBAL */
302
299
 
 
300
/* return the next largest power of 2 */
 
301
size_t adjust_power_of_2 (size_t u);
 
302
 
 
303
/*
 
304
 * A printf-like function (that only recognizes a subset of standard printf
 
305
 * format operators) that prints arguments to an argv list instead
 
306
 * of a standard string.  This is used to build up argv arrays for passing
 
307
 * to execve.
 
308
 */
 
309
void argv_init (struct argv *a);
 
310
struct argv argv_new (void);
 
311
void argv_reset (struct argv *a);
 
312
char *argv_term (const char **f);
 
313
const char *argv_str (const struct argv *a, struct gc_arena *gc, const unsigned int flags);
 
314
struct argv argv_insert_head (const struct argv *a, const char *head);
 
315
void argv_msg (const int msglev, const struct argv *a);
 
316
void argv_msg_prefix (const int msglev, const struct argv *a, const char *prefix);
 
317
 
 
318
#define APA_CAT (1<<0) /* concatentate onto existing struct argv list */
 
319
void argv_printf_arglist (struct argv *a, const char *format, const unsigned int flags, va_list arglist);
 
320
 
 
321
void argv_printf (struct argv *a, const char *format, ...)
 
322
#ifdef __GNUC__
 
323
  __attribute__ ((format (printf, 2, 3)))
 
324
#endif
 
325
  ;
 
326
 
 
327
void argv_printf_cat (struct argv *a, const char *format, ...)
 
328
#ifdef __GNUC__
 
329
  __attribute__ ((format (printf, 2, 3)))
 
330
#endif
 
331
  ;
 
332
 
303
333
#endif