~ubuntu-branches/ubuntu/trusty/syslog-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/unit/test_resolve_pwgr.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2010-08-04 17:17:51 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100804171751-5bvfxhlc5xrmi3n8
Tags: 3.1.2-1
* New upstream release. 
* Update to Standards-Version 3.9.1 .
* Build depend on libcap-dev to add capability support on Linux archs.
* Disable statistics logging (closes: #586749) and restore logging to
  /var/log/syslog .

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "misc.h"
 
2
 
 
3
int main(void)
 
4
{
 
5
  gint uid;
 
6
  gint gid;
 
7
 
 
8
  if (!resolve_user("root", &uid))
 
9
    return 1;
 
10
 
 
11
  if (!resolve_user("0", &uid) || uid != 0)
 
12
    return 1;
 
13
 
 
14
  if (!resolve_user("-1", &uid) || uid != -1)
 
15
    return 1;
 
16
 
 
17
  if (resolve_group("nincsily", &gid))
 
18
    return 1;
 
19
 
 
20
  if (!resolve_group("0", &gid) || gid != 0)
 
21
    return 1;
 
22
 
 
23
  if (!resolve_group("-1", &gid) || gid != -1)
 
24
    return 1;
 
25
 
 
26
  if (!resolve_group("daemon", &gid))
 
27
    return 1;
 
28
 
 
29
  if (resolve_group("nincsily", &gid))
 
30
    return 1;
 
31
  return 0;
 
32
}