blob: 9f69da185807506159c7c2ee0687f2ddfd5630cf [file] [log] [blame]
Eric Andersenaad1a882001-03-16 22:47:14 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */
27
Robert Grieblc9aca452002-06-04 20:06:25 +000028#include <unistd.h>
Eric Andersenaad1a882001-03-16 22:47:14 +000029#include <stdio.h>
30#include <stdlib.h>
Eric Andersen08ff8a42001-03-23 17:02:05 +000031#include <string.h>
Eric Andersenaad1a882001-03-16 22:47:14 +000032#include "busybox.h"
33
Eric Andersen2ccfef22001-03-19 19:30:24 +000034#undef APPLET
35#undef APPLET_NOUSAGE
36#undef PROTOTYPES
37#include "applets.h"
38
Eric Andersenaad1a882001-03-16 22:47:14 +000039struct BB_applet *applet_using;
40
Eric Andersen2ccfef22001-03-19 19:30:24 +000041/* The -1 arises because of the {0,NULL,0,-1} entry above. */
42const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
43
Robert Grieblc9aca452002-06-04 20:06:25 +000044
45#ifdef CONFIG_FEATURE_SUID
46
47static void check_suid ( struct BB_applet *app );
48
49#ifdef CONFIG_FEATURE_SUID_CONFIG
50
51#include <sys/stat.h>
52#include <ctype.h>
Eric Andersen887ca792002-07-03 23:19:26 +000053#include "pwd_.h"
54#include "grp_.h"
Robert Grieblc9aca452002-06-04 20:06:25 +000055
Robert Griebl0c789a42002-06-06 17:30:16 +000056static int parse_config_file ( void );
57
58static int config_ok;
Robert Grieblc9aca452002-06-04 20:06:25 +000059
60#define CONFIG_FILE "/etc/busybox.conf"
61
Glenn L McGrathb37367a2002-08-22 13:12:40 +000062/* applets [] is const, so we have to define this "override" structure */
Robert Grieblc9aca452002-06-04 20:06:25 +000063struct BB_suid_config {
64 struct BB_applet *m_applet;
65
66 uid_t m_uid;
67 gid_t m_gid;
68 mode_t m_mode;
Glenn L McGrathb37367a2002-08-22 13:12:40 +000069
Robert Grieblc9aca452002-06-04 20:06:25 +000070 struct BB_suid_config *m_next;
71};
72
73static struct BB_suid_config *suid_config;
74
Glenn L McGrathb37367a2002-08-22 13:12:40 +000075#endif /* CONFIG_FEATURE_SUID_CONFIG */
Robert Grieblc9aca452002-06-04 20:06:25 +000076
Glenn L McGrathb37367a2002-08-22 13:12:40 +000077#endif /* CONFIG_FEATURE_SUID */
Robert Grieblc9aca452002-06-04 20:06:25 +000078
79
80
Eric Andersenaad1a882001-03-16 22:47:14 +000081extern void show_usage(void)
82{
Glenn L McGrath4d4ef192002-11-28 21:49:06 +000083 const char *format_string;
Eric Andersenaad1a882001-03-16 22:47:14 +000084 const char *usage_string = usage_messages;
85 int i;
Eric Andersenaad1a882001-03-16 22:47:14 +000086
87 for (i = applet_using - applets; i > 0; ) {
88 if (!*usage_string++) {
89 --i;
90 }
91 }
Glenn L McGrath6ead3ab2002-11-28 08:33:04 +000092
Glenn L McGrath4d4ef192002-11-28 21:49:06 +000093 format_string = "%s\n\nUsage: %s %s\n\n";
94 if(*usage_string == '\b')
95 format_string = "%s\n\nNo help available.\n\n";
96 fprintf(stderr, format_string, full_version, applet_using->name, usage_string);
97
Eric Andersenaad1a882001-03-16 22:47:14 +000098 exit(EXIT_FAILURE);
99}
100
101static int applet_name_compare(const void *x, const void *y)
102{
103 const char *name = x;
104 const struct BB_applet *applet = y;
105
106 return strcmp(name, applet->name);
107}
108
Eric Andersen15576262001-06-24 06:09:14 +0000109extern const size_t NUM_APPLETS;
Eric Andersenaad1a882001-03-16 22:47:14 +0000110
111struct BB_applet *find_applet_by_name(const char *name)
112{
113 return bsearch(name, applets, NUM_APPLETS, sizeof(struct BB_applet),
114 applet_name_compare);
115}
116
117void run_applet_by_name(const char *name, int argc, char **argv)
118{
Mark Whitleybd4b6212001-06-15 16:54:25 +0000119 static int recurse_level = 0;
Matt Kraaiab3d8392001-08-27 17:19:38 +0000120 extern int been_there_done_that; /* From busybox.c */
Mark Whitleybd4b6212001-06-15 16:54:25 +0000121
Robert Grieblc9aca452002-06-04 20:06:25 +0000122#ifdef CONFIG_FEATURE_SUID_CONFIG
123 if ( recurse_level == 0 )
Robert Griebl0c789a42002-06-06 17:30:16 +0000124 config_ok = parse_config_file ( );
Robert Grieblc9aca452002-06-04 20:06:25 +0000125#endif
126
Mark Whitleybd4b6212001-06-15 16:54:25 +0000127 recurse_level++;
Eric Andersenaad1a882001-03-16 22:47:14 +0000128 /* Do a binary search to find the applet entry given the name. */
129 if ((applet_using = find_applet_by_name(name)) != NULL) {
130 applet_name = applet_using->name;
Mark Whitleybd4b6212001-06-15 16:54:25 +0000131 if (argv[1] && strcmp(argv[1], "--help") == 0) {
Matt Kraaiab3d8392001-08-27 17:19:38 +0000132 if (strcmp(applet_using->name, "busybox")==0) {
133 if(argv[2])
134 applet_using = find_applet_by_name(argv[2]);
135 else
136 applet_using = NULL;
137 }
138 if(applet_using)
139 show_usage();
140 been_there_done_that=1;
141 busybox_main(0, NULL);
Mark Whitleybd4b6212001-06-15 16:54:25 +0000142 }
Robert Grieblc9aca452002-06-04 20:06:25 +0000143#ifdef CONFIG_FEATURE_SUID
144 check_suid ( applet_using );
145#endif
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000146
Eric Andersenaad1a882001-03-16 22:47:14 +0000147 exit((*(applet_using->main)) (argc, argv));
148 }
Mark Whitleybd4b6212001-06-15 16:54:25 +0000149 /* Just in case they have renamed busybox - Check argv[1] */
150 if (recurse_level == 1) {
151 run_applet_by_name("busybox", argc, argv);
152 }
Matt Kraai861e6242001-08-27 15:08:57 +0000153 recurse_level--;
Eric Andersenaad1a882001-03-16 22:47:14 +0000154}
155
156
Robert Grieblc9aca452002-06-04 20:06:25 +0000157#ifdef CONFIG_FEATURE_SUID
158
159#ifdef CONFIG_FEATURE_SUID_CONFIG
160
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000161/* check if u is member of group g */
Robert Grieblc9aca452002-06-04 20:06:25 +0000162static int ingroup ( uid_t u, gid_t g )
163{
164 struct group *grp = getgrgid ( g );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000165
Robert Grieblc9aca452002-06-04 20:06:25 +0000166 if ( grp ) {
167 char **mem;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000168
Robert Grieblc9aca452002-06-04 20:06:25 +0000169 for ( mem = grp-> gr_mem; *mem; mem++ ) {
170 struct passwd *pwd = getpwnam ( *mem );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000171
Robert Grieblc9aca452002-06-04 20:06:25 +0000172 if ( pwd && ( pwd-> pw_uid == u ))
173 return 1;
174 }
175 }
176 return 0;
177}
178
179#endif
180
181
182void check_suid ( struct BB_applet *applet )
183{
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000184 uid_t ruid = getuid ( ); /* real [ug]id */
Robert Grieblc9aca452002-06-04 20:06:25 +0000185 uid_t rgid = getgid ( );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000186
Robert Grieblc9aca452002-06-04 20:06:25 +0000187#ifdef CONFIG_FEATURE_SUID_CONFIG
Robert Griebl0c789a42002-06-06 17:30:16 +0000188 if ( config_ok ) {
189 struct BB_suid_config *sct;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000190
Robert Griebl0c789a42002-06-06 17:30:16 +0000191 for ( sct = suid_config; sct; sct = sct-> m_next ) {
192 if ( sct-> m_applet == applet )
193 break;
194 }
195 if ( sct ) {
196 mode_t m = sct-> m_mode;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000197
198 if ( sct-> m_uid == ruid ) /* same uid */
Robert Griebl0c789a42002-06-06 17:30:16 +0000199 m >>= 6;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000200 else if (( sct-> m_gid == rgid ) || ingroup ( ruid, sct-> m_gid )) /* same group / in group */
Robert Griebl0c789a42002-06-06 17:30:16 +0000201 m >>= 3;
202
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000203 if (!( m & S_IXOTH )) /* is x bit not set ? */
Robert Griebl0c789a42002-06-06 17:30:16 +0000204 error_msg_and_die ( "You have no permission to run this applet!" );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000205
206 if (( sct-> m_mode & ( S_ISGID | S_IXGRP )) == ( S_ISGID | S_IXGRP )) { /* *both* have to be set for sgid */
Robert Griebl0c789a42002-06-06 17:30:16 +0000207 if ( setegid ( sct-> m_gid ))
208 error_msg_and_die ( "BusyBox binary has insufficient rights to set proper GID for applet!" );
209 }
210 else
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000211 setgid ( rgid ); /* no sgid -> drop */
212
Robert Griebl0c789a42002-06-06 17:30:16 +0000213 if ( sct-> m_mode & S_ISUID ) {
214 if ( seteuid ( sct-> m_uid ))
215 error_msg_and_die ( "BusyBox binary has insufficient rights to set proper UID for applet!" );
216 }
217 else
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000218 setuid ( ruid ); /* no suid -> drop */
Robert Griebl0c789a42002-06-06 17:30:16 +0000219 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000220 else { /* default: drop all priviledges */
Robert Griebl0c789a42002-06-06 17:30:16 +0000221 setgid ( rgid );
222 setuid ( ruid );
223 }
224 return;
Robert Grieblc9aca452002-06-04 20:06:25 +0000225 }
Robert Griebl0c789a42002-06-06 17:30:16 +0000226 else {
Robert Griebl88947dd2002-07-18 23:59:17 +0000227#ifndef CONFIG_FEATURE_SUID_CONFIG_QUIET
Robert Griebl0c789a42002-06-06 17:30:16 +0000228 static int onetime = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000229
Robert Griebl0c789a42002-06-06 17:30:16 +0000230 if ( !onetime ) {
231 onetime = 1;
232 fprintf ( stderr, "Using fallback suid method\n" );
233 }
Robert Griebl88947dd2002-07-18 23:59:17 +0000234#endif
Robert Grieblc9aca452002-06-04 20:06:25 +0000235 }
Robert Griebl0c789a42002-06-06 17:30:16 +0000236#endif
Robert Grieblc9aca452002-06-04 20:06:25 +0000237
238 if ( applet-> need_suid == _BB_SUID_ALWAYS ) {
239 if ( geteuid ( ) != 0 )
240 error_msg_and_die ( "This applet requires root priviledges!" );
241 }
242 else if ( applet-> need_suid == _BB_SUID_NEVER ) {
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000243 setgid ( rgid ); /* drop all priviledges */
Robert Grieblc9aca452002-06-04 20:06:25 +0000244 setuid ( ruid );
245 }
Robert Grieblc9aca452002-06-04 20:06:25 +0000246}
247
248#ifdef CONFIG_FEATURE_SUID_CONFIG
249
Robert Grieblc9aca452002-06-04 20:06:25 +0000250
Robert Griebl0c789a42002-06-06 17:30:16 +0000251#define parse_error(x) { err=x; goto pe_label; }
Robert Grieblc9aca452002-06-04 20:06:25 +0000252
253
Robert Griebl0c789a42002-06-06 17:30:16 +0000254int parse_config_file ( void )
Robert Grieblc9aca452002-06-04 20:06:25 +0000255{
256 struct stat st;
Robert Griebl0c789a42002-06-06 17:30:16 +0000257 char *err = 0;
258 FILE *f = 0;
259 int lc = 0;
Robert Grieblc9aca452002-06-04 20:06:25 +0000260
261 suid_config = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000262
263 /* is there a config file ? */
Robert Grieblc9aca452002-06-04 20:06:25 +0000264 if ( stat ( CONFIG_FILE, &st ) == 0 ) {
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000265 /* is it owned by root with no write perm. for group and others ? */
Robert Grieblc9aca452002-06-04 20:06:25 +0000266 if ( S_ISREG( st. st_mode ) && ( st. st_uid == 0 ) && (!( st. st_mode & ( S_IWGRP | S_IWOTH )))) {
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000267 /* that's ok .. then try to open it */
Robert Griebl0c789a42002-06-06 17:30:16 +0000268 f = fopen ( CONFIG_FILE, "r" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000269
270 if ( f ) {
Robert Griebl0c789a42002-06-06 17:30:16 +0000271 char buffer [256];
Robert Grieblc9aca452002-06-04 20:06:25 +0000272 int section = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000273
Robert Grieblc9aca452002-06-04 20:06:25 +0000274 while ( fgets ( buffer, sizeof( buffer ) - 1, f )) {
275 char c = buffer [0];
276 char *p;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000277
Robert Grieblc9aca452002-06-04 20:06:25 +0000278 lc++;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000279
Robert Grieblc9aca452002-06-04 20:06:25 +0000280 p = strchr ( buffer, '#' );
281 if ( p )
282 *p = 0;
283 p = buffer + xstrlen ( buffer );
284 while (( p > buffer ) && isspace ( *--p ))
285 *p = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000286
Robert Grieblc9aca452002-06-04 20:06:25 +0000287 if ( p == buffer )
288 continue;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000289
Robert Grieblc9aca452002-06-04 20:06:25 +0000290 if ( c == '[' ) {
291 p = strchr ( buffer, ']' );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000292
293 if ( !p || ( p == ( buffer + 1 ))) /* no matching ] or empty [] */
Robert Griebl0c789a42002-06-06 17:30:16 +0000294 parse_error ( "malformed section header" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000295
296 *p = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000297
Robert Grieblc9aca452002-06-04 20:06:25 +0000298 if ( strcasecmp ( buffer + 1, "SUID" ) == 0 )
299 section = 1;
300 else
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000301 section = -1; /* unknown section - just skip */
Robert Grieblc9aca452002-06-04 20:06:25 +0000302 }
303 else if ( section ) {
304 switch ( section ) {
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000305 case 1: { /* SUID */
Robert Grieblc9aca452002-06-04 20:06:25 +0000306 int l;
307 struct BB_applet *applet;
308
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000309 p = strchr ( buffer, '=' ); /* <key>[::space::]*=[::space::]*<value> */
310
311 if ( !p || ( p == ( buffer + 1 ))) /* no = or key is empty */
Robert Griebl0c789a42002-06-06 17:30:16 +0000312 parse_error ( "malformed keyword" );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000313
Robert Grieblc9aca452002-06-04 20:06:25 +0000314 l = p - buffer;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000315 while ( isspace ( buffer [--l] )) { } /* skip whitespace */
316
Robert Grieblc9aca452002-06-04 20:06:25 +0000317 buffer [l+1] = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000318
Robert Grieblc9aca452002-06-04 20:06:25 +0000319 if (( applet = find_applet_by_name ( buffer ))) {
320 struct BB_suid_config *sct = xmalloc ( sizeof( struct BB_suid_config ));
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000321
Robert Grieblc9aca452002-06-04 20:06:25 +0000322 sct-> m_applet = applet;
323 sct-> m_next = suid_config;
324 suid_config = sct;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000325
326 while ( isspace ( *++p )) { } /* skip whitespace */
327
Robert Grieblc9aca452002-06-04 20:06:25 +0000328 sct-> m_mode = 0;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000329
Robert Grieblc9aca452002-06-04 20:06:25 +0000330 switch ( *p++ ) {
331 case 'S': sct-> m_mode |= S_ISUID; break;
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000332 case 's': sct-> m_mode |= S_ISUID; /* no break */
Robert Grieblc9aca452002-06-04 20:06:25 +0000333 case 'x': sct-> m_mode |= S_IXUSR; break;
334 case '-': break;
Robert Griebl0c789a42002-06-06 17:30:16 +0000335 default : parse_error ( "invalid user mode" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000336 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000337
Robert Grieblc9aca452002-06-04 20:06:25 +0000338 switch ( *p++ ) {
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000339 case 's': sct-> m_mode |= S_ISGID; /* no break */
Robert Grieblc9aca452002-06-04 20:06:25 +0000340 case 'x': sct-> m_mode |= S_IXGRP; break;
341 case 'S': break;
342 case '-': break;
Robert Griebl0c789a42002-06-06 17:30:16 +0000343 default : parse_error ( "invalid group mode" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000344 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000345
Robert Grieblc9aca452002-06-04 20:06:25 +0000346 switch ( *p ) {
347 case 't':
348 case 'x': sct-> m_mode |= S_IXOTH; break;
349 case 'T':
350 case '-': break;
Robert Griebl0c789a42002-06-06 17:30:16 +0000351 default : parse_error ( "invalid other mode" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000352 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000353
354 while ( isspace ( *++p )) { } /* skip whitespace */
355
Robert Grieblc9aca452002-06-04 20:06:25 +0000356 if ( isdigit ( *p )) {
357 sct-> m_uid = strtol ( p, &p, 10 );
358 if ( *p++ != '.' )
Robert Griebl0c789a42002-06-06 17:30:16 +0000359 parse_error ( "parsing <uid>.<gid>" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000360 }
361 else {
362 struct passwd *pwd;
363 char *p2 = strchr ( p, '.' );
364
365 if ( !p2 )
Robert Griebl0c789a42002-06-06 17:30:16 +0000366 parse_error ( "parsing <uid>.<gid>" );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000367
Robert Grieblc9aca452002-06-04 20:06:25 +0000368 *p2 = 0;
369 pwd = getpwnam ( p );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000370
Robert Grieblc9aca452002-06-04 20:06:25 +0000371 if ( !pwd )
Robert Griebl0c789a42002-06-06 17:30:16 +0000372 parse_error ( "invalid user name" );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000373
Robert Grieblc9aca452002-06-04 20:06:25 +0000374 sct-> m_uid = pwd-> pw_uid;
375 p = p2 + 1;
376 }
377 if ( isdigit ( *p ))
378 sct-> m_gid = strtol ( p, &p, 10 );
379 else {
380 struct group *grp = getgrnam ( p );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000381
Robert Grieblc9aca452002-06-04 20:06:25 +0000382 if ( !grp )
Robert Griebl0c789a42002-06-06 17:30:16 +0000383 parse_error ( "invalid group name" );
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000384
Robert Grieblc9aca452002-06-04 20:06:25 +0000385 sct-> m_gid = grp-> gr_gid;
386 }
387 }
388 break;
389 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000390 default: /* unknown - skip */
Robert Grieblc9aca452002-06-04 20:06:25 +0000391 break;
392 }
393 }
394 else
Robert Griebl0c789a42002-06-06 17:30:16 +0000395 parse_error ( "keyword not within section" );
Robert Grieblc9aca452002-06-04 20:06:25 +0000396 }
397 fclose ( f );
Robert Grieble4f9f3a2002-07-16 21:53:59 +0000398 return 1;
Robert Grieblc9aca452002-06-04 20:06:25 +0000399 }
400 }
401 }
Glenn L McGrathb37367a2002-08-22 13:12:40 +0000402 return 0; /* no config file or not readable (not an error) */
403
Robert Griebl0c789a42002-06-06 17:30:16 +0000404pe_label:
405 fprintf ( stderr, "Parse error in %s, line %d: %s\n", CONFIG_FILE, lc, err );
406
407 if ( f )
408 fclose ( f );
409 return 0;
Robert Grieblc9aca452002-06-04 20:06:25 +0000410}
411
412#endif
413
414#endif
415
Eric Andersenaad1a882001-03-16 22:47:14 +0000416/* END CODE */
417/*
418Local Variables:
419c-file-style: "linux"
420c-basic-offset: 4
421tab-width: 4
422End:
423*/