Main Page | Class List | File List | Class Members | File Members

ict-main.cpp File Reference

inotify cron table manipulator main file More...

#include <argp.h>
#include <pwd.h>
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include "incrontab.h"

Classes

struct  arguments

Defines

#define INCRON_DEFAULT_EDITOR   "vim"

Enumerations

enum  { OPER_NONE, OPER_LIST, OPER_REMOVE, OPER_EDIT }

Functions

static error_t parse_opt (int key, char *arg, struct argp_state *state)
void unlink_suid (const char *file, uid_t uid)
bool copy_from_file (const char *path, const char *user)
bool remove_table (const char *user)
bool list_table (const char *user)
bool edit_table (const char *user)
int main (int argc, char **argv)

Variables

const char * argp_program_version = "incrontab 0.1.0"
const char * argp_program_bug_address = "<bugs@aiken.cz>"
static char doc [] = "Table manipulator for incrond (inotify Cron daemon)"
static char args_doc [] = "FILE"
static struct argp_option options []
static struct argp argp = { options, parse_opt, args_doc, doc }


Detailed Description

inotify cron table manipulator main file

inotify cron system

Copyright (C) 2006 Lukas Jelinek, <lukas@aiken.cz>

This program is free software; you can use it, redistribute it and/or modify it under the terms of the GNU General Public License, version 2 (see LICENSE-GPL).


Define Documentation

#define INCRON_DEFAULT_EDITOR   "vim"
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
OPER_NONE 
OPER_LIST 
OPER_REMOVE 
OPER_EDIT 


Function Documentation

bool copy_from_file const char *  path,
const char *  user
 

bool edit_table const char *  user  ) 
 

bool list_table const char *  user  ) 
 

int main int  argc,
char **  argv
 

static error_t parse_opt int  key,
char *  arg,
struct argp_state *  state
[static]
 

bool remove_table const char *  user  ) 
 

void unlink_suid const char *  file,
uid_t  uid
 


Variable Documentation

struct argp argp = { options, parse_opt, args_doc, doc } [static]
 

const char* argp_program_bug_address = "<bugs@aiken.cz>"
 

const char* argp_program_version = "incrontab 0.1.0"
 

char args_doc[] = "FILE" [static]
 

char doc[] = "Table manipulator for incrond (inotify Cron daemon)" [static]
 

struct argp_option options[] [static]
 

Initial value:

 {
  {"list",    'l', 0,      0,  "List current table" },
  {"remove",  'r', 0,      0,  "Remove table completely" },
  {"edit",    'e', 0,      0,  "Edit table" },
  {"user",    'u', "USER", 0,  "Override current user" },
  { 0 }
}


Generated on Wed Oct 4 19:51:39 2006 for incron by  doxygen 1.4.4