not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kdm / backend / dm.h
blob50f0757f236bb65a354fb9980aa6b2a72dc49ce6
1 /*
3 Copyright 1988, 1998 The Open Group
4 Copyright 2000-2005 Oswald Buddenhagen <ossi@kde.org>
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
10 documentation.
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of a copyright holder shall
24 not be used in advertising or otherwise to promote the sale, use or
25 other dealings in this Software without prior written authorization
26 from the copyright holder.
31 * xdm - display manager daemon
32 * Author: Keith Packard, MIT X Consortium
34 * global xdm core declarations
37 #ifndef _DM_H_
38 #define _DM_H_ 1
40 #include "greet.h"
42 #define WANT_CORE_DECLS
43 #include <config.ci>
45 #include <X11/X.h> /* FamilyInternet6 */
46 #include <X11/Xos.h>
47 #include <X11/Xfuncs.h>
48 #include <X11/Xmd.h>
49 #include <X11/Xauth.h>
51 #include <sys/param.h>
52 #ifdef HAVE_LIMITS_H
53 # include <limits.h>
54 #endif
56 #include <time.h>
57 #include <sys/time.h>
58 #include <stdlib.h>
59 #include <errno.h>
61 extern char **environ;
63 #ifdef XDMCP
64 # if defined(__osf__)
65 /* someone somewhere defines QUERY under Tru64 which confuses Xdmcp.h */
66 # undef QUERY
67 # endif
68 # include <X11/Xdmcp.h>
69 #endif
71 #ifndef PATH_MAX
72 # ifdef MAXPATHLEN
73 # define PATH_MAX MAXPATHLEN
74 # else
75 # define PATH_MAX 1024
76 # endif
77 #endif
79 #include <sys/wait.h>
80 #define waitCode(w) (WIFEXITED(w) ? WEXITSTATUS(w) : 0)
81 #define waitSig(w) (WIFSIGNALED(w) ? WTERMSIG(w) : 0)
82 #ifdef WCOREDUMP
83 # define waitCore(w) (WCOREDUMP(w))
84 #else
85 # define waitCore(w) 0 /* not in POSIX. so what? */
86 #endif
88 #define wcCompose(sig,core,code) ((sig) * 256 + (core) * 128 + (code))
89 #define wcFromWait(w) wcCompose(waitSig(w), waitCore(w), waitCode(w))
90 #define wcCode(w) ((w) & 0x7f)
91 #define wcCore(w) (((w) >> 7) & 1)
92 #define wcSig(w) (((w) >> 8) & 0xff)
94 #include <setjmp.h>
95 #if defined(__EMX__) || (defined(__NetBSD__) && defined(__sparc__)) /* XXX netbsd? */
96 # define Setjmp(e) setjmp(e)
97 # define Longjmp(e,v) longjmp(e,v)
98 # define Jmp_buf jmp_buf
99 #else
100 # define Setjmp(e) sigsetjmp(e,1)
101 # define Longjmp(e,v) siglongjmp(e,v)
102 # define Jmp_buf sigjmp_buf
103 #endif
105 #include <utmp.h>
106 #ifdef HAVE_UTMPX
107 # include <utmpx.h>
108 # define STRUCTUTMP struct utmpx
109 # define UTMPNAME utmpxname
110 # define SETUTENT setutxent
111 # define GETUTENT getutxent
112 # define PUTUTLINE pututxline
113 # define ENDUTENT endutxent
114 # define ut_time ut_tv.tv_sec
115 #else
116 # define STRUCTUTMP struct utmp
117 # define UTMPNAME utmpname
118 # define SETUTENT setutent
119 # define GETUTENT getutent
120 # define PUTUTLINE pututline
121 # define ENDUTENT endutent
122 #endif
123 #ifndef HAVE_STRUCT_UTMP_UT_USER
124 # define ut_user ut_name
125 #endif
126 #ifndef WTMP_FILE
127 # ifdef _PATH_WTMPX
128 # define WTMP_FILE _PATH_WTMPX
129 # elif defined(_PATH_WTMP)
130 # define WTMP_FILE _PATH_WTMP
131 # else
132 # define WTMP_FILE "/usr/adm/wtmp"
133 # endif
134 #endif
135 #ifndef UTMP_FILE
136 # ifdef _PATH_UTMPX
137 # define UTMP_FILE _PATH_UTMPX
138 # elif defined(_PATH_UTMP)
139 # define UTMP_FILE _PATH_UTMP
140 # else
141 # define UTMP_FILE "/etc/utmp"
142 # endif
143 #endif
145 #ifdef HAVE_NETCONFIG_H
146 # define STREAMSCONN
147 #else
148 # define UNIXCONN
149 # define TCPCONN
150 # ifdef FamilyInternet6
151 # define IPv6
152 # endif
153 # ifdef HAVE_NETDNET_DN_H
154 # define DNETCONN
155 # endif
156 #endif
158 #if !defined(HAVE_ARC4RANDOM) && !defined(DEV_RANDOM)
159 # define NEED_ENTROPY
160 #endif
162 typedef struct GPipe {
163 #if defined(__FreeBSD__) || defined(UNIXCONN)
164 # define SINGLE_PIPE
165 union
166 #else
167 struct
168 #endif
170 int w, r;
171 } fd;
172 char *who;
173 } GPipe;
175 typedef struct GTalk {
176 GPipe *pipe;
177 Jmp_buf errjmp;
178 } GTalk;
180 typedef struct GProc {
181 GPipe pipe;
182 int pid;
183 } GProc;
185 typedef enum displayStatus { notRunning = 0, running, zombie, phoenix, raiser,
186 textMode, reserve, remoteLogin } DisplayStatus;
188 typedef enum serverStatus { ignore = 0, awaiting, starting,
189 terminated, killed, pausing } ServerStatus;
191 typedef struct {
192 unsigned how:2, /* 0=none 1=reboot 2=halt (SHUT_*) */
193 force:2;
194 int uid;
195 int start;
196 int timeout;
197 char *osname;
198 time_t bmstamp;
199 int osindex;
200 } SdRec;
202 typedef struct RcStr {
203 struct RcStr *next;
204 char *str;
205 int cnt;
206 } RcStr;
208 typedef struct CfgDep {
209 RcStr *name;
210 long time;
211 } CfgDep;
213 typedef struct CfgArr {
214 void *data; /* config value array; allocated */
215 int *idx; /* config index array; alias */
216 CfgDep dep; /* filestamp */
217 int numCfgEnt; /* number of config entries */
218 } CfgArr;
220 struct bsock {
221 int fd;
222 int buflen;
223 char *buffer;
226 struct cmdsock {
227 struct cmdsock *next;
228 struct bsock sock; /* buffered fd of the socket */
231 typedef struct {
232 struct cmdsock *css; /* open connections */
234 char *path; /* filename of the socket */
235 int fd; /* fd of the socket */
236 int gid; /* owner group of the socket */
237 } CtrlRec;
239 struct display {
240 struct display *next;
241 struct disphist *hstent; /* display history entry */
243 /* basic display information */
244 char *name; /* DISPLAY name -- also referenced in hstent */
245 char *class2; /* display class (may be NULL) */
246 int displayType; /* location/origin/lifetime */
247 CfgArr cfg; /* config data array */
249 /* display state */
250 DisplayStatus status; /* current status */
251 int zstatus; /* substatus while zombie */
252 int pid; /* process id of child */
253 int serverPid; /* process id of server (-1 if none) */
254 #ifdef HAVE_VTS
255 int serverVT; /* server VT (0 = none, -1 = pending) */
256 struct display *follower; /* on exit, hand VT to this display */
257 #endif
258 ServerStatus serverStatus; /* X server startup state */
259 time_t lastStart; /* time of last display start */
260 int startTries; /* current start try */
261 int stillThere; /* state during HUP processing */
262 int userSess; /* -1=nobody, otherwise uid */
263 char *userName;
264 char *sessName;
265 SdRec sdRec; /* user session requested shutdown */
266 CtrlRec ctrl; /* command socket */
267 GPipe pipe; /* comm master <-> slave */
268 GPipe gpipe; /* comm master <-> greeter */
269 #ifdef XDMCP
270 char *remoteHost; /* for X -query type remote login */
271 /* XDMCP state */
272 unsigned sessionID; /* ID of active session */
273 ARRAY8 peer; /* display peer address (sockaddr) */
274 ARRAY8 from; /* XDMCP peer address (sockaddr) */
275 unsigned displayNumber; /* numerical part of name */
276 int useChooser; /* Run the chooser for this display */
277 ARRAY8 clientAddr; /* for chooser picking */
278 ARRAY8 clientPort; /* ... */
279 unsigned connectionType; /* ... */
280 int xdmcpFd;
281 #endif
283 CONF_CORE_LOCAL_DEFS
285 int idleTimeout; /* abort login after that time */
287 unsigned short *authNameLens; /* authorization protocol name lens */
289 /* information potentially derived from resources */
290 int authNameNum; /* number of protocol names */
291 Xauth **authorizations; /* authorization data */
292 int authNum; /* number of authorizations */
293 char *authFile; /* file to store authorization in */
296 #define d_location 1
297 #define dLocal 1 /* server runs on local host */
298 #define dForeign 0 /* server runs on remote host */
300 #define d_lifetime 6
301 #define dPermanent 4 /* display restarted when session exits */
302 #define dReserve 2 /* display not restarted when session exits */
303 #define dTransient 0 /* display removed when session exits */
305 #ifdef XDMCP
306 #define d_origin 8
307 #else
308 #define d_origin 0 /* clever, huh? :) */
309 #endif
310 #define dFromXDMCP 8 /* started with XDMCP */
311 #define dFromFile 0 /* started via entry in servers file */
313 struct disphist {
314 struct disphist *next;
315 char *name;
316 time_t lastExit; /* time of last display exit */
317 unsigned rLogin:2, /* 0=nothing 1=relogin 2=login */
318 lock:1, /* screen locker running */
319 goodExit:1; /* was the last exit "peaceful"? */
320 char *nuser, *npass, *nargs;
323 #ifdef XDMCP
325 #define PROTO_TIMEOUT (30 * 60) /* 30 minutes should be long enough */
327 struct protoDisplay {
328 struct protoDisplay *next;
329 XdmcpNetaddr address; /* UDP address */
330 int addrlen; /* UDP address length */
331 unsigned long date; /* creation date */
332 CARD16 displayNumber;
333 CARD16 connectionType;
334 ARRAY8 connectionAddress;
335 CARD32 sessionID;
336 Xauth *fileAuthorization;
337 Xauth *xdmcpAuthorization;
338 ARRAY8 authenticationName;
339 ARRAY8 authenticationData;
340 XdmAuthKeyRec key;
342 #endif /* XDMCP */
344 /* status code for rStopDisplay */
345 #define DS_MASK 255
346 # define DS_RESTART 0
347 # define DS_TEXTMODE 1
348 # define DS_RESERVE 2
349 # define DS_REMOTE 3
350 # define DS_REMOVE 4
351 #define DS_SCHEDULE 256 /* flag for DS_TEXTMODE */
353 /* command codes dpy process -> master process */
354 #define D_User 1
355 #define D_ReLogin 2
356 #define D_ChooseHost 4
357 #define D_RemoteHost 5
358 #define D_XConnOk 6
359 #define D_UnUser 7
361 extern int debugLevel;
363 CONF_CORE_GLOBAL_DECLS
365 /* in daemon.c */
366 void becomeDaemon( void );
368 /* in dm.c */
369 #if KDM_LIBEXEC_STRIP != -1
370 extern char *progpath;
371 #endif
372 #if KDM_LIBEXEC_STRIP
373 extern char *progname;
374 #endif
375 extern char *prog;
376 extern time_t now;
377 extern SdRec sdRec;
378 void startDisplay( struct display *d );
379 void startDisplayP2( struct display *d );
380 void stopDisplay( struct display *d );
381 #if !defined(HAVE_SETPROCTITLE) && !defined(NOXDMTITLE)
382 void setproctitle( const char *fmt, ... );
383 #endif
384 void switchToX( struct display *d );
385 void setNLogin( struct display *d,
386 const char *nuser, const char *npass, const char *nargs,
387 int rl );
388 void cancelShutdown( void );
389 int TTYtoVT( const char *tty );
390 int activateVT( int vt );
392 /* in ctrl.c */
393 void openCtrl( struct display *d );
394 void closeCtrl( struct display *d );
395 int handleCtrl( fd_set *reads, struct display *d );
396 void chownCtrl( CtrlRec *cr, int uid );
397 void updateCtrl( void );
399 /* in dpylist.c */
400 extern struct display *displays; /* that's ugly ... */
401 int anyDisplaysLeft( void );
402 void forEachDisplay( void (*f)( struct display * ) );
403 #ifdef HAVE_VTS
404 void forEachDisplayRev( void (*f)( struct display * ) );
405 #endif
406 void removeDisplay( struct display *old );
407 struct display
408 *findDisplayByName( const char *name ),
409 #ifdef XDMCP
410 *findDisplayBySessionID( CARD32 sessionID ),
411 *findDisplayByAddress( XdmcpNetaddr addr, int addrlen, CARD16 displayNumber ),
412 #endif /* XDMCP */
413 *findDisplayByPid( int pid ),
414 *findDisplayByServerPid( int serverPid ),
415 *newDisplay( const char *name );
416 int anyRunningDisplays( void );
417 int anyReserveDisplays( void );
418 int idleReserveDisplays( void );
419 int startReserveDisplay( int lt );
420 const char *displayName( struct display * );
422 /* in reset.c */
423 void pseudoReset( void );
425 /* in resource.c */
426 void **findCfgEnt( struct display *d, int id );
427 int initResources( char **argv );
428 int loadDMResources( int force );
429 int loadDisplayResources( struct display *d );
430 void scanServers( void );
431 void closeGetter( void );
432 int startConfig( int what, CfgDep *dep, int force );
433 RcStr *newStr( char *str );
434 void delStr( RcStr *str );
435 extern GTalk cnftalk;
437 /* in session.c */
438 extern struct display *td;
439 extern const char *td_setup;
440 char **baseEnv( char **env, const char *user );
441 char **inheritEnv( char **env, const char **what );
442 char **systemEnv( char **env, const char *user );
443 int source( char **env, const char *file, const char *arg );
444 void manageSession( void );
446 extern GTalk mstrtalk, grttalk;
447 extern GProc grtproc;
448 void openGreeter( void );
449 int closeGreeter( int force );
450 int ctrlGreeterWait( int wreply );
451 void prepareErrorGreet( void );
452 void finishGreet( void );
453 char *conv_interact( int what, const char *prompt );
455 /* process.c */
456 typedef void (*SIGFUNC)( int );
457 SIGFUNC Signal( int, SIGFUNC handler );
459 void registerInput( int fd );
460 void unregisterInput( int fd );
461 void registerCloseOnFork( int fd );
462 void clearCloseOnFork( int fd );
463 void closeNclearCloseOnFork( int fd );
464 int Fork( volatile int *pid );
465 int Wait4( volatile int *pid );
466 void execute( char **argv, char **env );
467 int runAndWait( char **args, char **env );
468 FILE *pOpen( char **what, char m, volatile int *pid );
469 int pClose( FILE *f, volatile int *pid );
470 char *locate( const char *exe );
471 void terminateProcess( int pid, int sig );
473 void gSet( GTalk *talk ); /* call before gOpen! */
474 void gCloseOnExec( GPipe *pajp );
475 int gFork( GPipe *pajp, const char *pname, char *cname,
476 GPipe *ogp, char *cgname, GPipe *igp, volatile int *pid );
477 void gClosen( GPipe *pajp );
478 int gOpen( GProc *proc,
479 char **argv, const char *what, char **env, char *cname,
480 GPipe *igp );
481 int gClose( GProc *proc, GPipe *gp, int force );
483 void gSendInt( int val );
484 int gRecvInt( void );
485 int gRecvCmd( int *cmd );
486 void gSendArr( int len, const char *data );
487 char *gRecvArr( int *len );
488 int gRecvStrBuf( char *buf );
489 int gRecvArrBuf( char *buf );
490 void gSendStr( const char *buf );
491 void gSendNStr( const char *buf, int len ); /* exact len, buf != 0 */
492 void gSendStrN( const char *buf, int len ); /* maximal len */
493 char *gRecvStr( void );
494 void gSendArgv( char **argv );
495 void gSendStrArr( int len, char **data );
496 char **gRecvStrArr( int *len );
497 char **gRecvArgv( void );
499 /* client.c */
500 #define GCONV_NORMAL 0
501 #define GCONV_HIDDEN 1
502 #define GCONV_USER 2
503 #define GCONV_PASS 3
504 #define GCONV_PASS_ND 4
505 #define GCONV_BINARY 5
506 typedef char *(*GConvFunc)( int what, const char *prompt );
507 int verify( GConvFunc gconv, int rootok );
508 int startClient( volatile int *pid );
509 void clientExited( void );
510 void sessionExit( int status ) ATTR_NORETURN;
511 int readDmrc( void );
512 extern char **userEnviron, **systemEnviron;
513 extern char *curuser, *curpass, *curtype, *newpass,
514 *dmrcuser, *curdmrc, *newdmrc;
515 extern int cursource;
516 #define PWSRC_MANUAL 0
517 #define PWSRC_AUTOLOGIN 1
518 #define PWSRC_RELOGIN 2
520 /* server.c */
521 char **prepareServerArgv( struct display *d, const char *args );
522 void startServer( struct display *d );
523 void abortStartServer( struct display *d );
524 void startServerSuccess( void );
525 void startServerFailed( void );
526 void startServerTimeout( void );
527 extern struct display *startingServer;
528 extern time_t serverTimeout;
530 void waitForServer( struct display *d );
531 void resetServer( struct display *d );
532 int pingServer( struct display *d );
533 extern struct _XDisplay *dpy;
535 /* in util.c */
536 void *Calloc( size_t nmemb, size_t size );
537 void *Malloc( size_t size );
538 void *Realloc( void *ptr, size_t size );
539 void wipeStr( char *str );
540 int strCmp( const char *s1, const char *s2 );
541 #ifndef HAVE_STRNLEN
542 int strnlen( const char *s, int max );
543 #endif
544 int strNDup( char **dst, const char *src, int len );
545 int strDup( char **dst, const char *src );
546 int arrLen( char **arr );
547 void freeStrArr( char **arr );
548 char **initStrArr( char **arr );
549 char **xCopyStrArr( int rn, char **arr );
550 /* Note: the following functions free the old data even in case of failure */
551 int reStrN( char **dst, const char *src, int len );
552 int reStr( char **dst, const char *src );
553 int strApp( char **dst, ... );
554 char **addStrArr( char **arr, const char *str, int len );
555 char **parseArgs( char **argv, const char *string );
556 /* End note */
557 char **setEnv( char **e, const char *name, const char *value );
558 char **putEnv( const char *string, char **env );
559 const char *getEnv( char **e, const char *name );
560 const char *localHostname( void );
561 int reader( int fd, void *buf, int len );
562 int writer( int fd, const void *buf, int len );
563 int fGets( char *buf, int max, FILE *f );
564 time_t mTime( const char *fn );
565 void listSessions( int flags, struct display *d, void *ctx,
566 void (*emitXSess)( struct display *, struct display *, void * ),
567 void (*emitTTYSess)( STRUCTUTMP *, struct display *, void * ) );
568 int anyUserLogins( int exclude_uid );
570 struct expando {
571 char key;
572 int uses;
573 const char *val;
575 char *expandMacros( const char *str, struct expando *expandos );
577 /* in inifile.c */
578 char *iniLoad( const char *fname );
579 int iniSave( const char *data, const char *fname );
580 char *iniEntry( char *data, const char *section, const char *key, const char *value );
581 char *iniMerge( char *data, const char *newdata );
583 /* in bootman.c */
584 int getBootOptions( char ***opts, int *def, int *cur );
585 int setBootOption( const char *opt, SdRec *sdr );
586 void commitBootOption( void );
588 /* in netaddr.c */
589 CARD8 *netaddrAddress( char *netaddrp, int *lenp );
590 CARD8 *netaddrPort( char *netaddrp, int *lenp );
591 int convertAddr( char *saddr, int *len, CARD8 **addr );
592 int netaddrFamily( char *netaddrp );
593 int addressEqual( char *a1, int len1, char *a2, int len2 );
595 #ifdef XDMCP
597 /* in xdmcp.c */
598 char *networkAddressToHostname( CARD16 connectionType, ARRAY8Ptr connectionAddress );
599 void sendFailed( struct display *d, const char *reason );
600 void initXdmcp( void );
602 /* in policy.c */
603 struct sockaddr;
604 ARRAY8Ptr isAccepting( struct sockaddr *from, int fromlen, CARD16 displayNumber );
605 ARRAY8Ptr chooseAuthentication( ARRAYofARRAY8Ptr authenticationNames );
606 int checkAuthentication( struct protoDisplay *pdpy, ARRAY8Ptr displayID, ARRAY8Ptr name, ARRAY8Ptr data );
607 int selectAuthorizationTypeIndex( ARRAY8Ptr authenticationName, ARRAYofARRAY8Ptr authorizationNames );
608 int selectConnectionTypeIndex( ARRAY16Ptr connectionTypes, ARRAYofARRAY8Ptr connectionAddresses );
609 int isWilling( ARRAY8Ptr addr, CARD16 connectionType, ARRAY8Ptr authenticationName, ARRAY8Ptr status, xdmOpCode type );
611 /* in protodpy.c */
612 void disposeProtoDisplay( struct protoDisplay *pdpy );
614 struct protoDisplay *findProtoDisplay( XdmcpNetaddr address, int addrlen,
615 CARD16 displayNumber );
616 struct protoDisplay *newProtoDisplay( XdmcpNetaddr address, int addrlen,
617 CARD16 displayNumber,
618 CARD16 connectionType,
619 ARRAY8Ptr connectionAddress,
620 CARD32 sessionID );
622 #define FamilyBroadcast 0xffff
623 typedef void (*ChooserFunc)( CARD16 connectionType, ARRAY8Ptr addr, char *closure );
624 typedef void (*ListenFunc)( ARRAY8Ptr addr, void **closure );
626 /* in access.c */
627 ARRAY8Ptr getLocalAddress( void );
628 int acceptableDisplayAddress( ARRAY8Ptr clientAddress, CARD16 connectionType, xdmOpCode type );
629 int forEachMatchingIndirectHost( ARRAY8Ptr clientAddress, ARRAY8Ptr clientPort, CARD16 connectionType,
630 ChooserFunc function, char *closure );
631 void scanAccessDatabase( int force );
632 int useChooser( ARRAY8Ptr clientAddress, CARD16 connectionType );
633 void forEachChooserHost( ARRAY8Ptr clientAddress, CARD16 connectionType, ChooserFunc function, char *closure );
634 void forEachListenAddr( ListenFunc listenfunction, ListenFunc mcastfcuntion, void **closure );
636 /* in choose.c */
637 time_t disposeIndirectHosts( void );
638 ARRAY8Ptr indirectChoice( ARRAY8Ptr clientAddress, ARRAY8Ptr clientPort, CARD16 connectionType );
639 int checkIndirectChoice( ARRAY8Ptr clientAddress, ARRAY8Ptr clientPort, CARD16 connectionType );
640 void registerIndirectChoice( ARRAY8Ptr clientAddress, ARRAY8Ptr clientPort, CARD16 connectionType,
641 ARRAY8Ptr choice );
642 int doChoose( void );
644 /* socket.c or streams.c */
645 void updateListenSockets( void );
646 int anyListenSockets( void );
647 int processListenSockets( fd_set *reads );
649 /* in xdmcp.c */
650 void processRequestSocket( int fd );
652 #endif /* XDMCP */
654 /* in sessreg.c */
655 void sessreg( struct display *d, int pid, const char *user, int uid );
657 #endif /* _DM_H_ */