~ubuntu-branches/debian/sid/rlinetd/sid

« back to all changes in this revision

Viewing changes to src/data.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2010-03-20 18:03:45 UTC
  • mfrom: (2.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320180345-x1srfbe2tg00ezsf
Tags: 0.7-1
* New upstream version.
* Recommend rsyslog instead of sysklogd (closes: #526922).
* update-inetd:
  + add support for enabling, disabling and removing entries;
  + use ucf for managing generated files;
  + ignore ucf files in rlinetd.conf;
  + make appropriate changes in  postinst and postrm scripts.
* Set debhelper compat level to 7
* Standards-Version: 3.8.4 (no changes). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef H_DATA
 
2
#define H_DATA
 
3
 
 
4
#include <sys/time.h>
 
5
#include <sys/types.h>
 
6
#include <sys/resource.h>
 
7
 
 
8
#include "config.h"
 
9
 
 
10
#include "bytecode.h"
 
11
#include "rlinetd.h"
 
12
#include "assemble.h"
 
13
 
 
14
#ifdef HAVE_CAPABILITIES
 
15
#include <sys/capability.h>
 
16
#endif
 
17
 
 
18
struct numlist {
 
19
        long num;
 
20
        struct numlist *next;
 
21
};
 
22
 
 
23
enum { FLAG_USER = 0x1,
 
24
                   FLAG_GROUP = 0x2,
 
25
       FLAG_INITGROUPS = 0x4 };
 
26
                
 
27
 
 
28
#define has_flag(x, y) (((x)->sflags & (y)) == (y))
 
29
#define set_flag(x, y) {(x)->sflags |= (y);RL_PWARN("X%d", __LINE__);}
 
30
#define reset_flag(x, y) {(x)->sflags &= (~y);RL_PWARN("X%d", __LINE__);}
 
31
 
 
32
 
 
33
 
 
34
struct service {
 
35
        struct stringlist *port;
 
36
        struct stringlist *interface;
 
37
        char *name;
 
38
        int family;
 
39
        int socktype;
 
40
        int proto;
 
41
        char *protoname;
 
42
        int backlog;
 
43
        int limit;
 
44
        int wait;
 
45
        struct rlimit r;
 
46
        char *rpcname;
 
47
        long rpcnum;
 
48
        struct numlist *rpcvers;
 
49
#ifdef HAVE_CAPABILITIES
 
50
        cap_t caps;
 
51
#endif
 
52
 
 
53
  rl_opcode_t opfixups [ ofp_max_fixups ];
 
54
        int sflags;                     /* uid/gid flags */
 
55
        
 
56
        int disabled;           /* if parse error in service declaration */
 
57
        int internal;           /* if internal service */
 
58
 
 
59
        rl_opcode_t run;        /* opstream to hook onto listening socket */
 
60
#ifdef HAVE_NET_BPF_H
 
61
        void *filter;                                                                   /* LSF program to attach to sockets */
 
62
        int filterlen;                                                          /* length of above LSF program */
 
63
#endif  
 
64
};
 
65
 
 
66
void numlist_add(struct numlist **, long);
 
67
void numlist_copy(struct numlist **, struct numlist *);
 
68
void numlist_free(struct numlist *);
 
69
 
 
70
struct stringlist {
 
71
        char *str;
 
72
        struct stringlist *next;
 
73
};
 
74
 
 
75
void stringlist_add(struct stringlist **, char *);
 
76
void stringlist_copy(struct stringlist **, struct stringlist *);
 
77
void stringlist_free(struct stringlist *);
 
78
 
 
79
struct userdata {
 
80
        uid_t uid;
 
81
        gid_t gid;
 
82
        char *name;
 
83
};
 
84
 
 
85
void builduserdata(struct userdata **, char *);
 
86
void clearuserdata(struct userdata **);
 
87
void newuserdata(struct userdata **); 
 
88
void userdata_copy(struct userdata **, struct userdata *);
 
89
 
 
90
#endif /* !H_DATA */
 
91
 
 
92
/* vim: set ts=2: */