~ubuntu-branches/ubuntu/dapper/asterisk/dapper-security

« back to all changes in this revision

Viewing changes to config.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-05-18 10:21:06 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060518102106-5vgpbtylsvr9jiu3
Tags: 1:1.2.7.1.dfsg-2ubuntu1
* Resynchronized with Debian, only Ubuntu changes:
  - debian/*.init:
    - create /var/run/ directory if necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
#include "asterisk.h"
43
43
 
44
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7221 $")
 
44
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 7634 $")
45
45
 
46
46
#include "asterisk/config.h"
47
47
#include "asterisk/cli.h"
470
470
                                /* #exec </path/to/executable>
471
471
                                   We create a tmp file, then we #include it, then we delete it. */
472
472
                                if (do_exec) { 
473
 
                                        snprintf(exec_file, sizeof(exec_file), "/var/tmp/exec.%ld.%ld", time(NULL), (long)pthread_self());
 
473
                                        snprintf(exec_file, sizeof(exec_file), "/var/tmp/exec.%d.%ld", (int)time(NULL), (long)pthread_self());
474
474
                                        snprintf(cmd, sizeof(cmd), "%s > %s 2>&1", cur, exec_file);
475
475
                                        ast_safe_system(cmd);
476
476
                                        cur = exec_file;