#include <argp.h>
#include <pwd.h>
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include "incron.h"
#include "incrontab.h"
Classes | |
struct | arguments |
incrontab arguments More... | |
Defines | |
#define | INCRON_DEFAULT_EDITOR "vim" |
Enumerations | |
enum | InCronTab_Operation_t { OPER_NONE, OPER_LIST, OPER_REMOVE, OPER_EDIT } |
incrontab operations More... | |
Functions | |
static error_t | parse_opt (int key, char *arg, struct argp_state *state) |
Parses the program options (arguments). | |
void | unlink_suid (const char *file, uid_t uid) |
Unlink a file with temporarily changed UID. | |
bool | copy_from_file (const char *path, const char *user) |
Copies a file to an user table. | |
bool | remove_table (const char *user) |
Removes an user table. | |
bool | list_table (const char *user) |
Lists an user table. | |
bool | edit_table (const char *user) |
Allows to edit an user table. | |
int | main (int argc, char **argv) |
Variables | |
const char * | argp_program_version = INCRON_TAB_NAME " " INCRON_VERSION |
const char * | argp_program_bug_address = INCRON_BUG_ADDRESS |
static char | doc [] = "incrontab - incron table manipulator" |
static char | args_doc [] = "FILE" |
static struct argp_option | options [] |
static struct argp | argp = { options, parse_opt, args_doc, doc } |
Program arguments. |
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).
|
|
|
incrontab operations
|
|
Copies a file to an user table.
|
|
Allows to edit an user table.
|
|
Lists an user table.
|
|
|
|
Parses the program options (arguments).
|
|
Removes an user table.
|
|
Unlink a file with temporarily changed UID.
|
|
Program arguments.
|
|
|
|
|
|
|
|
|
|
Initial value: { {"list", 'l', 0, 0, "List the current table" }, {"remove", 'r', 0, 0, "Remove the table completely" }, {"edit", 'e', 0, 0, "Edit the table" }, {"user", 'u', "USER", 0, "Override the current user" }, { 0 } } |