ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/src/ircd.c
Revision: 65
Committed: Mon Oct 3 23:33:16 2005 UTC (20 years, 10 months ago) by adx
Content type: text/x-csrc
File size: 19156 byte(s)
Log Message:
- removed external references from libio/misc
- imported s_misc.c to libio, moved CurrentTime there

File Contents

# User Rev Content
1 adx 30 /*
2     * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3     * ircd.c: Starts up and runs the ircd.
4     *
5     * Copyright (C) 2002 by the past and present ircd coders, and others.
6     *
7     * This program is free software; you can redistribute it and/or modify
8     * it under the terms of the GNU General Public License as published by
9     * the Free Software Foundation; either version 2 of the License, or
10     * (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20     * USA
21     *
22 knight 31 * $Id$
23 adx 30 */
24    
25     #include "stdinc.h"
26     #include "s_user.h"
27     #include "tools.h"
28     #include "ircd.h"
29     #include "channel.h"
30     #include "channel_mode.h"
31     #include "client.h"
32     #include "common.h"
33     #include "event.h"
34     #include "fdlist.h"
35     #include "hash.h"
36     #include "irc_string.h"
37     #include "sprintf_irc.h"
38     #include "ircd_signal.h"
39     #include "list.h"
40     #include "s_gline.h"
41     #include "motd.h"
42     #include "ircd_handler.h"
43     #include "msg.h" /* msgtab */
44     #include "hostmask.h"
45     #include "numeric.h"
46     #include "packet.h"
47     #include "parse.h"
48     #include "irc_res.h"
49     #include "restart.h"
50     #include "s_auth.h"
51     #include "s_bsd.h"
52     #include "s_conf.h"
53     #include "s_log.h"
54     #include "s_misc.h"
55     #include "s_serv.h" /* try_connections */
56     #include "s_stats.h"
57     #include "send.h"
58     #include "whowas.h"
59     #include "modules.h"
60     #include "memory.h"
61     #include "hook.h"
62     #include "ircd_getopt.h"
63     #include "balloc.h"
64     #include "motd.h"
65     #include "supported.h"
66    
67     /* Try and find the correct name to use with getrlimit() for setting the max.
68     * number of files allowed to be open by this process.
69     */
70    
71     /* /quote set variables */
72     struct SetOptions GlobalSetOptions;
73    
74     /* configuration set from ircd.conf */
75     struct config_file_entry ConfigFileEntry;
76     /* server info set from ircd.conf */
77     struct server_info ServerInfo;
78     /* admin info set from ircd.conf */
79     struct admin_info AdminInfo = { NULL, NULL, NULL };
80     struct Counter Count = { 0, 0, 0, 0, 0, 0, 0, 0 };
81     struct ServerState_t server_state = { 0 };
82     struct logging_entry ConfigLoggingEntry = { 1, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} };
83     struct Client me; /* That's me */
84     struct LocalUser meLocalUser; /* That's also part of me */
85     unsigned long connect_id = 0; /* unique connect ID */
86    
87     static unsigned long initialVMTop = 0; /* top of virtual memory at init */
88     const char *logFileName = LPATH;
89     const char *pidFileName = PPATH;
90    
91     char **myargv;
92     char ircd_platform[PLATFORMLEN];
93    
94     int dorehash = 0;
95     int doremotd = 0;
96     time_t nextconnect = 1; /* time for next try_connections call */
97    
98     /* Set to zero because it should be initialized later using
99     * initialize_server_capabs
100     */
101     int default_server_capabs = 0;
102    
103     #ifdef HAVE_LIBCRYPTO
104     int bio_spare_fd = -1;
105     #endif
106    
107     int splitmode;
108     int splitchecking;
109     int split_users;
110     unsigned int split_servers;
111    
112     /* Do klines the same way hybrid-6 did them, i.e. at the
113     * top of the next io_loop instead of in the same loop as
114     * the klines are being applied.
115     *
116     * This should fix strange CPU starvation as very indirectly reported.
117     * (Why do you people not email bug reports? WHY? WHY?)
118     *
119     * - Dianora
120     */
121    
122     int rehashed_klines = 0;
123    
124     /*
125     * get_vm_top - get the operating systems notion of the resident set size
126     */
127     #ifndef _WIN32
128     static unsigned long
129     get_vm_top(void)
130     {
131     /*
132     * NOTE: sbrk is not part of the ANSI C library or the POSIX.1 standard
133     * however it seems that everyone defines it. Calling sbrk with a 0
134     * argument will return a pointer to the top of the process virtual
135     * memory without changing the process size, so this call should be
136     * reasonably safe (sbrk returns the new value for the top of memory).
137     * This code relies on the notion that the address returned will be an
138     * offset from 0 (NULL), so the result of sbrk is cast to a size_t and
139     * returned. We really shouldn't be using it here but...
140     */
141    
142     void *vptr = sbrk(0);
143     return((unsigned long)vptr);
144     }
145    
146     /*
147     * print_startup - print startup information
148     */
149     static void
150     print_startup(int pid)
151     {
152     printf("ircd: version %s\n", ircd_version);
153     printf("ircd: pid %d\n", pid);
154     printf("ircd: running in %s mode from %s\n", !server_state.foreground ? "background"
155     : "foreground", ConfigFileEntry.dpath);
156     }
157    
158     static void
159     make_daemon(void)
160     {
161     int pid;
162    
163     if ((pid = fork()) < 0)
164     {
165     perror("fork");
166     exit(EXIT_FAILURE);
167     }
168     else if (pid > 0)
169     {
170     print_startup(pid);
171     exit(EXIT_SUCCESS);
172     }
173    
174     setsid();
175     }
176     #endif
177    
178     /*
179     * get_maxrss - get the operating systems notion of the resident set size
180     */
181     unsigned long
182     get_maxrss(void)
183     {
184     #ifdef _WIN32
185     return (0); /* FIXME */
186     #else
187     return (get_vm_top() - initialVMTop);
188     #endif
189     }
190    
191     static int printVersion = 0;
192    
193     struct lgetopt myopts[] = {
194     {"dlinefile", &ConfigFileEntry.dlinefile,
195     STRING, "File to use for dline.conf"},
196     {"configfile", &ConfigFileEntry.configfile,
197     STRING, "File to use for ircd.conf"},
198     {"klinefile", &ConfigFileEntry.klinefile,
199     STRING, "File to use for kline.conf"},
200     {"xlinefile", &ConfigFileEntry.xlinefile,
201     STRING, "File to use for xline.conf"},
202     {"logfile", &logFileName,
203     STRING, "File to use for ircd.log"},
204     {"pidfile", &pidFileName,
205     STRING, "File to use for process ID"},
206     {"foreground", &server_state.foreground,
207     YESNO, "Run in foreground (don't detach)"},
208     {"version", &printVersion,
209     YESNO, "Print version and exit"},
210     {"help", NULL, USAGE, "Print this text"},
211     {NULL, NULL, STRING, NULL},
212     };
213    
214     void
215     set_time(void)
216     {
217     static char to_send[200];
218     struct timeval newtime;
219     #ifdef _WIN32
220     FILETIME ft;
221    
222     GetSystemTimeAsFileTime(&ft);
223     if (ft.dwLowDateTime < 0xd53e8000)
224     ft.dwHighDateTime--;
225     ft.dwLowDateTime -= 0xd53e8000;
226     ft.dwHighDateTime -= 0x19db1de;
227    
228     newtime.tv_sec = (*(uint64_t *) &ft) / 10000000;
229     newtime.tv_usec = (*(uint64_t *) &ft) / 10 % 1000000;
230     #else
231     newtime.tv_sec = 0;
232     newtime.tv_usec = 0;
233    
234     if (gettimeofday(&newtime, NULL) == -1)
235     {
236     ilog(L_ERROR, "Clock Failure (%s), TS can be corrupted",
237     strerror(errno));
238     sendto_realops_flags(UMODE_ALL, L_ALL,
239     "Clock Failure (%s), TS can be corrupted",
240     strerror(errno));
241     restart("Clock Failure");
242     }
243     #endif
244    
245     if (newtime.tv_sec < CurrentTime)
246     {
247     ircsprintf(to_send, "System clock is running backwards - (%lu < %lu)",
248     (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
249     report_error(L_ALL, to_send, me.name, 0);
250     set_back_events(CurrentTime - newtime.tv_sec);
251     }
252    
253     SystemTime.tv_sec = newtime.tv_sec;
254     SystemTime.tv_usec = newtime.tv_usec;
255     }
256    
257     static void
258     io_loop(void)
259     {
260     while (1 == 1)
261     {
262     /*
263     * Maybe we want a flags word?
264     * ie. if (REHASHED_KLINES(global_flags))
265     * SET_REHASHED_KLINES(global_flags)
266     * CLEAR_REHASHED_KLINES(global_flags)
267     *
268     * - Dianora
269     */
270     if (rehashed_klines)
271     {
272     check_conf_klines();
273     rehashed_klines = 0;
274     }
275    
276     if (listing_client_list.head)
277     {
278     dlink_node *ptr = NULL, *ptr_next = NULL;
279     DLINK_FOREACH_SAFE(ptr, ptr_next, listing_client_list.head)
280     {
281     struct Client *client_p = ptr->data;
282     assert(client_p->localClient->list_task);
283     safe_list_channels(client_p, client_p->localClient->list_task, 0, 0);
284     }
285     }
286    
287     /* Run pending events, then get the number of seconds to the next
288     * event
289     */
290     while (eventNextTime() <= CurrentTime)
291     eventRun();
292    
293     comm_select();
294     exit_aborted_clients();
295     free_exited_clients();
296     send_queued_all();
297    
298     /* Check to see whether we have to rehash the configuration .. */
299     if (dorehash)
300     {
301     rehash(1);
302     dorehash = 0;
303     }
304     if (doremotd)
305     {
306     read_message_file(&ConfigFileEntry.motd);
307     sendto_realops_flags(UMODE_ALL, L_ALL,
308     "Got signal SIGUSR1, reloading ircd motd file");
309     doremotd = 0;
310     }
311     }
312     }
313    
314     /* initalialize_global_set_options()
315     *
316     * inputs - none
317     * output - none
318     * side effects - This sets all global set options needed
319     */
320     static void
321     initialize_global_set_options(void)
322     {
323     memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
324    
325     GlobalSetOptions.autoconn = 1;
326     GlobalSetOptions.spam_time = MIN_JOIN_LEAVE_TIME;
327     GlobalSetOptions.spam_num = MAX_JOIN_LEAVE_COUNT;
328    
329     if (ConfigFileEntry.default_floodcount)
330     GlobalSetOptions.floodcount = ConfigFileEntry.default_floodcount;
331     else
332     GlobalSetOptions.floodcount = 10;
333    
334     /* XXX I have no idea what to try here - Dianora */
335     GlobalSetOptions.joinfloodcount = 16;
336     GlobalSetOptions.joinfloodtime = 8;
337    
338     split_servers = ConfigChannel.default_split_server_count;
339     split_users = ConfigChannel.default_split_user_count;
340    
341     if (split_users && split_servers && (ConfigChannel.no_create_on_split ||
342     ConfigChannel.no_join_on_split))
343     {
344     splitmode = 1;
345     splitchecking = 1;
346     }
347    
348     GlobalSetOptions.ident_timeout = IDENT_TIMEOUT;
349     GlobalSetOptions.idletime = ConfigFileEntry.idletime;
350     /* End of global set options */
351     }
352    
353     /* initialize_message_files()
354     *
355     * inputs - none
356     * output - none
357     * side effects - Set up all message files needed, motd etc.
358     */
359     static void
360     initialize_message_files(void)
361     {
362     init_message_file(USER_MOTD, MPATH, &ConfigFileEntry.motd);
363     init_message_file(OPER_MOTD, OPATH, &ConfigFileEntry.opermotd);
364     init_message_file(USER_LINKS, LIPATH, &ConfigFileEntry.linksfile);
365    
366     read_message_file(&ConfigFileEntry.motd);
367     read_message_file(&ConfigFileEntry.opermotd);
368     read_message_file(&ConfigFileEntry.linksfile);
369    
370     init_isupport();
371     }
372    
373     /* initialize_server_capabs()
374     *
375     * inputs - none
376     * output - none
377     */
378     static void
379     initialize_server_capabs(void)
380     {
381     add_capability("QS", CAP_QS, 1);
382     add_capability("LL", CAP_LL, 1);
383     add_capability("EOB", CAP_EOB, 1);
384     if (ServerInfo.sid != NULL) /* only enable TS6 if we have an SID */
385     add_capability("TS6", CAP_TS6, 0);
386     add_capability("ZIP", CAP_ZIP, 0);
387     add_capability("CLUSTER", CAP_CLUSTER, 1);
388     #ifdef HALFOPS
389     add_capability("HOPS", CAP_HOPS, 1);
390     #endif
391     }
392    
393     /* write_pidfile()
394     *
395     * inputs - filename+path of pid file
396     * output - NONE
397     * side effects - write the pid of the ircd to filename
398     */
399     static void
400     write_pidfile(const char *filename)
401     {
402     FBFILE *fb;
403    
404     if ((fb = fbopen(filename, "w")))
405     {
406     char buff[32];
407     unsigned int pid = (unsigned int)getpid();
408     size_t nbytes = ircsprintf(buff, "%u\n", pid);
409    
410     if ((fbputs(buff, fb, nbytes) == -1))
411     ilog(L_ERROR, "Error writing %u to pid file %s (%s)",
412     pid, filename, strerror(errno));
413    
414     fbclose(fb);
415     return;
416     }
417     else
418     {
419     ilog(L_ERROR, "Error opening pid file %s", filename);
420     }
421     }
422    
423     /* check_pidfile()
424     *
425     * inputs - filename+path of pid file
426     * output - none
427     * side effects - reads pid from pidfile and checks if ircd is in process
428     * list. if it is, gracefully exits
429     * -kre
430     */
431     static void
432     check_pidfile(const char *filename)
433     {
434     #ifndef _WIN32
435     FBFILE *fb;
436     char buff[32];
437     pid_t pidfromfile;
438    
439     /* Don't do logging here, since we don't have log() initialised */
440     if ((fb = fbopen(filename, "r")))
441     {
442     if (fbgets(buff, 20, fb) == NULL)
443     {
444     /* log(L_ERROR, "Error reading from pid file %s (%s)", filename,
445     * strerror(errno));
446     */
447     }
448     else
449     {
450     pidfromfile = atoi(buff);
451    
452     if (!kill(pidfromfile, 0))
453     {
454     /* log(L_ERROR, "Server is already running"); */
455     printf("ircd: daemon is already running\n");
456     exit(-1);
457     }
458     }
459    
460     fbclose(fb);
461     }
462     else if (errno != ENOENT)
463     {
464     /* log(L_ERROR, "Error opening pid file %s", filename); */
465     }
466     #endif
467     }
468    
469     /* setup_corefile()
470     *
471     * inputs - nothing
472     * output - nothing
473     * side effects - setups corefile to system limits.
474     * -kre
475     */
476     static void
477     setup_corefile(void)
478     {
479     #ifdef HAVE_SYS_RESOURCE_H
480     struct rlimit rlim; /* resource limits */
481    
482     /* Set corefilesize to maximum */
483     if (!getrlimit(RLIMIT_CORE, &rlim))
484     {
485     rlim.rlim_cur = rlim.rlim_max;
486     setrlimit(RLIMIT_CORE, &rlim);
487     }
488     #endif
489     }
490    
491     /* init_ssl()
492     *
493     * inputs - nothing
494     * output - nothing
495     * side effects - setups SSL context.
496     */
497     static void
498     init_ssl(void)
499     {
500     #ifdef HAVE_LIBCRYPTO
501     SSL_load_error_strings();
502     SSLeay_add_ssl_algorithms();
503    
504     ServerInfo.ctx = SSL_CTX_new(SSLv23_server_method());
505     if (!ServerInfo.ctx)
506     {
507     const char *s;
508    
509     fprintf(stderr, "ERROR: Could not initialize the SSL context -- %s\n",
510     s = ERR_lib_error_string(ERR_get_error()));
511     ilog(L_CRIT, "ERROR: Could not initialize the SSL context -- %s\n", s);
512     }
513    
514     SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_NO_SSLv2);
515     SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
516     SSL_CTX_set_verify(ServerInfo.ctx, SSL_VERIFY_NONE, NULL);
517    
518     bio_spare_fd = save_spare_fd("SSL private key validation");
519     #endif /* HAVE_LIBCRYPTO */
520     }
521    
522     /* init_callbacks()
523     *
524     * inputs - nothing
525     * output - nothing
526     * side effects - setups standard hook points
527     */
528     static void
529     init_callbacks(void)
530     {
531     iorecv_cb = register_callback("iorecv", NULL);
532     iosend_cb = register_callback("iosend", NULL);
533     iorecvctrl_cb = register_callback("iorecvctrl", NULL);
534     iosendctrl_cb = register_callback("iosendctrl", NULL);
535     }
536    
537     int
538     main(int argc, char *argv[])
539     {
540     /* Check to see if the user is running
541     * us as root, which is a nono
542     */
543     #ifndef _WIN32
544     if (geteuid() == 0)
545     {
546     fprintf(stderr, "Don't run ircd as root!!!\n");
547 adx 62 return 1;
548 adx 30 }
549    
550     /* Setup corefile size immediately after boot -kre */
551     setup_corefile();
552    
553     /* set initialVMTop before we allocate any memory */
554     initialVMTop = get_vm_top();
555     #endif
556    
557     /* save server boot time right away, so getrusage works correctly */
558     set_time();
559    
560 adx 62 outofmemory = ircd_outofmemory;
561    
562     /* It ain't random, but it ought to be a little harder to guess */
563 adx 30 srand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));
564     memset(&me, 0, sizeof(me));
565     memset(&meLocalUser, 0, sizeof(meLocalUser));
566     me.localClient = &meLocalUser;
567     dlinkAdd(&me, &me.node, &global_client_list); /* Pointer to beginning
568     of Client list */
569    
570     memset(&ServerInfo, 0, sizeof(ServerInfo));
571    
572     /* Initialise the channel capability usage counts... */
573     init_chcap_usage_counts();
574    
575     ConfigFileEntry.dpath = DPATH;
576     ConfigFileEntry.configfile = CPATH; /* Server configuration file */
577     ConfigFileEntry.klinefile = KPATH; /* Server kline file */
578     ConfigFileEntry.xlinefile = XPATH; /* Server xline file */
579     ConfigFileEntry.rxlinefile = RXPATH; /* Server regex xline file */
580     ConfigFileEntry.rklinefile = RKPATH; /* Server regex kline file */
581     ConfigFileEntry.dlinefile = DLPATH; /* dline file */
582     ConfigFileEntry.glinefile = GPATH; /* gline log file */
583     ConfigFileEntry.cresvfile = CRESVPATH; /* channel resv file */
584     ConfigFileEntry.nresvfile = NRESVPATH; /* nick resv file */
585     myargv = argv;
586     umask(077); /* better safe than sorry --SRB */
587    
588     parseargs(&argc, &argv, myopts);
589    
590     if (printVersion)
591     {
592     printf("ircd: version %s\n", ircd_version);
593     exit(EXIT_SUCCESS);
594     }
595    
596     if (chdir(ConfigFileEntry.dpath))
597     {
598     perror("chdir");
599     exit(EXIT_FAILURE);
600     }
601    
602     init_ssl();
603    
604     #ifndef _WIN32
605     if (!server_state.foreground)
606     {
607     make_daemon();
608     close_standard_fds(); /* this needs to be before init_netio()! */
609     }
610     else
611     print_startup(getpid());
612    
613     setup_signals();
614     #endif
615    
616     get_ircd_platform(ircd_platform);
617    
618     /* Init the event subsystem */
619     eventInit();
620     /* We need this to initialise the fd array before anything else */
621     fdlist_init();
622     init_log(logFileName);
623     check_can_use_v6();
624     init_comm(); /* This needs to be setup early ! -- adrian */
625     /* Check if there is pidfile and daemon already running */
626     check_pidfile(pidFileName);
627    
628     #ifndef NOBALLOC
629     initBlockHeap();
630     #endif
631     init_dlink_nodes();
632     init_callbacks();
633     initialize_message_files();
634     dbuf_init();
635     init_hash();
636     init_ip_hash_table(); /* client host ip hash table */
637     init_host_hash(); /* Host-hashtable. */
638     clear_tree_parse();
639     init_client();
640     init_class();
641     init_whowas();
642     init_stats();
643     read_conf_files(1); /* cold start init conf files */
644     initServerMask();
645     me.id[0] = '\0';
646     init_uid();
647     init_auth(); /* Initialise the auth code */
648     #ifndef _WIN32
649     init_resolver(); /* Needs to be setup before the io loop */
650     #endif
651     initialize_server_capabs(); /* Set up default_server_capabs */
652     initialize_global_set_options();
653     init_channels();
654 adx 48 init_channel_modes();
655 adx 30
656     if (ServerInfo.name == NULL)
657     {
658     ilog(L_CRIT, "No server name specified in serverinfo block.");
659     exit(EXIT_FAILURE);
660     }
661     strlcpy(me.name, ServerInfo.name, sizeof(me.name));
662    
663     /* serverinfo{} description must exist. If not, error out.*/
664     if (ServerInfo.description == NULL)
665     {
666     ilog(L_CRIT,
667     "ERROR: No server description specified in serverinfo block.");
668     exit(EXIT_FAILURE);
669     }
670     strlcpy(me.info, ServerInfo.description, sizeof(me.info));
671    
672     me.from = &me;
673     me.servptr = &me;
674    
675     SetMe(&me);
676     make_server(&me);
677    
678     me.lasttime = me.since = me.firsttime = CurrentTime;
679     hash_add_client(&me);
680    
681     /* add ourselves to global_serv_list */
682     dlinkAdd(&me, make_dlink_node(), &global_serv_list);
683    
684     check_class();
685    
686     #ifndef STATIC_MODULES
687     if (chdir(MODPATH))
688     {
689     ilog (L_CRIT, "Could not load core modules. Terminating!");
690     exit(EXIT_FAILURE);
691     }
692    
693     load_all_modules(1);
694     load_conf_modules();
695     load_core_modules(1);
696     /* Go back to DPATH after checking to see if we can chdir to MODPATH */
697     chdir(ConfigFileEntry.dpath);
698     #else
699     load_all_modules(1);
700     #endif
701     /*
702     * assemble_umode_buffer() has to be called after
703     * reading conf/loading modules.
704     */
705     assemble_umode_buffer();
706    
707     write_pidfile(pidFileName);
708    
709     ilog(L_NOTICE, "Server Ready");
710    
711     eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
712     eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
713    
714     /* We want try_connections to be called as soon as possible now! -- adrian */
715     /* No, 'cause after a restart it would cause all sorts of nick collides */
716     eventAddIsh("try_connections", try_connections, NULL, STARTUP_CONNECTIONS_TIME);
717    
718     eventAddIsh("collect_zipstats", collect_zipstats, NULL, ZIPSTATS_TIME);
719    
720     /* Setup the timeout check. I'll shift it later :) -- adrian */
721     eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1);
722    
723     if (ConfigServerHide.links_delay > 0)
724     eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay);
725     else
726     ConfigServerHide.links_disabled = 1;
727    
728     if (splitmode)
729     eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
730    
731     io_loop();
732     return(0);
733     }

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision