~clint-fewbar/ubuntu/oneiric/lxc/use-uec-for-natty

« back to all changes in this revision

Viewing changes to src/lxc/console.c

  • Committer: Bazaar Package Importer
  • Author(s): Guido Trotter
  • Date: 2010-08-04 13:23:42 UTC
  • mfrom: (1.1.5 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100804132342-ds4lm3oaroeoxfxx
Tags: 0.7.2-1
* New upstream version
* Convert libcap dependency to versioned (closes: #571527)
* Bump up standards version to 3.9.0
* Fix too-deep /usr/lib/lxc/lxc path (closes: #587847)
* Add init script (closes: #573830)
  Thanks to Przemysław Knycz <pknycz@kolnet.eu> for the base example
* Bump up standards version (3.9.1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <sys/types.h>
31
31
#include <sys/un.h>
32
32
 
33
 
#include <lxc/log.h>
34
 
#include <lxc/conf.h>
35
 
#include <lxc/start.h>  /* for struct lxc_handler */
36
 
 
 
33
#include "log.h"
 
34
#include "conf.h"
 
35
#include "start.h"      /* for struct lxc_handler */
 
36
#include "caps.h"
37
37
#include "commands.h"
38
38
#include "mainloop.h"
39
39
#include "af_unix.h"
139
139
        return 1;
140
140
}
141
141
 
142
 
static get_default_console(char **console)
 
142
static int get_default_console(char **console)
143
143
{
144
144
        int fd;
145
145
 
192
192
                goto err;
193
193
        }
194
194
 
195
 
        fd = open(console->path, O_CLOEXEC | O_RDWR | O_CREAT | O_APPEND, 0600);
 
195
        fd = lxc_unpriv(open(console->path, O_CLOEXEC | O_RDWR | O_CREAT |
 
196
                             O_APPEND, 0600));
196
197
        if (fd < 0) {
197
198
                SYSERROR("failed to open '%s'", console->path);
198
199
                goto err;