[Initng-svn] r3160 - in initng/trunk: plugins/find plugins/ngc2
plugins/suid src
svn at initng.thinktux.net
svn at initng.thinktux.net
Wed Mar 1 01:56:35 CET 2006
Author: deac
Date: Wed Mar 1 01:56:34 2006
New Revision: 3160
Modified:
initng/trunk/plugins/find/initng_find.c
initng/trunk/plugins/ngc2/ngc2.c
initng/trunk/plugins/suid/initng_suid.c
initng/trunk/src/main.c
Log:
indent
Modified: initng/trunk/plugins/find/initng_find.c
==============================================================================
--- initng/trunk/plugins/find/initng_find.c (original)
+++ initng/trunk/plugins/find/initng_find.c Wed Mar 1 01:56:34 2006
@@ -29,7 +29,7 @@
#include <assert.h>
#include <sys/types.h>
#include <dirent.h>
- /*#include <dirent.h> *//* opendir() closedir() */
+ /*#include <dirent.h> *//* opendir() closedir() */
#include "../../src/initng_global.h"
#include "../../src/initng_string_tools.h"
Modified: initng/trunk/plugins/ngc2/ngc2.c
==============================================================================
--- initng/trunk/plugins/ngc2/ngc2.c (original)
+++ initng/trunk/plugins/ngc2/ngc2.c Wed Mar 1 01:56:34 2006
@@ -667,8 +667,8 @@
#ifdef HAVE_NCURSES
/* get cols and lines */
setupterm(NULL, fileno(stdout), (int *) 0);
- nrows = tigetnum((char*)"lines"); /* to work around a compiler warning */
- ncolumns = tigetnum((char*)"cols"); /* (iffy function definitions) */
+ nrows = tigetnum((char *) "lines"); /* to work around a compiler warning */
+ ncolumns = tigetnum((char *) "cols"); /* (iffy function definitions) */
printf("This terminal has %i cols and %i rows\n", nrows, ncolumns);
#endif
if (argv[1] && strcmp(argv[1], "--quiet") == 0)
Modified: initng/trunk/plugins/suid/initng_suid.c
==============================================================================
--- initng/trunk/plugins/suid/initng_suid.c (original)
+++ initng/trunk/plugins/suid/initng_suid.c Wed Mar 1 01:56:34 2006
@@ -56,24 +56,27 @@
assert(process);
tmp = initng_active_db_get_string(&SUID, service);
- if(tmp) username = fix_variables(tmp, service);
+ if (tmp)
+ username = fix_variables(tmp, service);
- if(username)
+ if (username)
{
i = strcspn(username, ":");
if (username[i] == ':')
- {
- groupname = strdup(username + i + 1);
- username[i] = 0;
- }
+ {
+ groupname = strdup(username + i + 1);
+ username[i] = 0;
+ }
else if ((tmp = initng_active_db_get_string(&SGID, service)))
- {
- groupname = fix_variables(tmp, service);
- }
+ {
+ groupname = fix_variables(tmp, service);
+ }
}
- if(groupname) group = getgrnam(groupname);
- if(username) passwd = getpwnam(username);
+ if (groupname)
+ group = getgrnam(groupname);
+ if (username)
+ passwd = getpwnam(username);
if (group)
gid = group->gr_gid;
@@ -101,7 +104,8 @@
setgid(gid);
}
- if (passwd) initgroups(passwd->pw_name, passwd->pw_gid);
+ if (passwd)
+ initgroups(passwd->pw_name, passwd->pw_gid);
if (uid)
{
@@ -109,8 +113,10 @@
setuid(uid);
}
- if(groupname) free(groupname);
- if(username) free(username);
+ if (groupname)
+ free(groupname);
+ if (username)
+ free(username);
/* group and passwd are static data structures - don't free */
return ret;
}
Modified: initng/trunk/src/main.c
==============================================================================
--- initng/trunk/src/main.c (original)
+++ initng/trunk/src/main.c Wed Mar 1 01:56:34 2006
@@ -76,7 +76,7 @@
FILE *cfg;
char buf[4096];
int seconfig = -2;
- char *nonconst; //Ugly hack!
+ char *nonconst; //Ugly hack!
selinux_getenforcemode(&seconfig);
@@ -121,7 +121,7 @@
nonconst = malloc(sizeof(SELINUXMNT));
strcpy(nonconst, SELINUXMNT);
- set_selinuxmnt(nonconst); /* set manually since we mounted it */
+ set_selinuxmnt(nonconst); /* set manually since we mounted it */
free(nonconst);
policy_version = security_policyvers();
@@ -378,14 +378,14 @@
if ((fopen("/selinux/enforce", "r")) != NULL)
goto BOOT;
int enforce = -1;
- char* nonconst;
+ char *nonconst;
if (getenv("SELINUX_INIT") == NULL)
{
nonconst = malloc(sizeof("SELINUX_INIT=YES"));
strcpy(nonconst, "SELINUX_INIT=YES");
putenv(nonconst);
- free(nonconst);
+ free(nonconst);
if (load_policy(&enforce) == 0)
{
execv(argv[0], argv);
More information about the Initng-svn
mailing list