ProFTPD Developer's Guide: API Functions

ProFTPD Version 1.2

__walk_pools

Declaration:
  static long __walk_pools(pool *p, int level)
Comments: Walk all the pools, start with the top-level permanent pool, displaying a tree.

Source File:
src/pool.c

_add_allow_deny

Declaration:
  MODRET _add_allow_deny(cmd_rec *cmd, char *name)
Source File:
modules/mod_core.c

_add_allow_deny_group

Declaration:
  MODRET _add_allow_deny_group(cmd_rec *cmd, char *name)
Source File:
modules/mod_core.c

_add_allow_deny_user

Declaration:
  MODRET _add_allow_deny_user(cmd_rec *cmd, char *name)
Source File:
modules/mod_core.c

_auth_anonymous_group

Declaration:
  static config_rec *_auth_anonymous_group(pool *p, char *user)
Comments: Check to see if the given user is a member of an AnonymousGroup group, and returns the config_rec in which the matching AnonymousGroup directive was found, or else NULL.

Source File:
modules/mod_auth.c

_auth_group

Declaration:
  static config_rec *_auth_group(pool *p, char *user, char **group, char **ournamep,
    char **anonnamep, char *pass)
Comments: This function handles groups-based authentication (rarely used), and is only checked if user-based password authentication fails.

Source File:
modules/mod_auth.c

_auth_lookup_id

Declaration:
  static idmap_t *_auth_lookup_id(xaset_t **id_table, idauth_t id)

Source File:
modules/mod_auth_unix.c

_auth_resolve_user

Declaration:
  static config_rec *_auth_resolve_user(pool *p, char **user, char **ournamep,
    char **anonnamep)
Source File:
modules/mod_auth.c

_calc_fs

Declaration:
  unsigned long _calc_fs(unsigned long blocks, unsigned long bsize)
Source File:
src/support.c

_chdir

Declaration:
  MODRET _chdir(cmd_rec *cmd, char *ndir)
Source File:
modules/mod_core.c

_check_group_access

Declaration:
  static int _check_group_access(xaset_t *conf, char *name)
Source File:
src/dirtree.c

_check_ip_access

Declaration:
  static int _check_ip_access(xaset_t *conf, char *name)
Source File:
src/dirtree.c

_check_ip_negative

Declaration:
  static int _check_ip_negative(const config_rec *c)
Source File:
src/dirtree.c

_check_ip_positive

Declaration:
  static int _check_ip_positive(const config_rec *c)
Source File:
src/dirtree.c

_check_limit

Declaration:
  static int _check_limit(config_rec *c)
Comments: Checks <Limit> ACLs. Returns 1 if the operation is explicitly allowed, 0 if implicitly allowed, -1 if implicitly denied, and -2 if explicitly denied.

Source File:
src/dirtree.c

_check_limits

Declaration:
  static int _check_limits(xaset_t *set, char *cmd, int hidden)
Source File:
src/dirtree.c

_check_limit_allow

Declaration:
  static int _check_limit_allow(config_rec *c)
Source File:
src/dirtree.c

_check_limit_deny

Declaration:
  static int _check_limit_deny(config_rec *c)
Source File:
src/dirtree.c

_check_user_access

Declaration:
  static int _check_user_access(xaset_t *conf, char *name)
Source File:
src/dirtree.c

_compare_file_mtime

Declaration:
  int _compare_file_mtime(const struct sort_filename *f1, const struct sort_filename *f2)
Source File:
modules/mod_ls.c

_compare_file_mtime_reversed

Declaration:
  int _compare_file_mtime_reversed(const struct sort_filename *f1, const struct sort_filename *f2)
Source File:
modules/mod_ls.c

_compare_gid

Declaration:
  inline static int _compare_gid(idmap_t *m1, idmap_t *m2)
Source File:
modules/mod_auth_unix.c

_compare_id

Declaration:
  inline static int _compare_id(xaset_t **table, idauth_t id, idauth_t idcomp)
Source File:
modules/mod_auth_unix.c

_compare_sym

Declaration:
  static int _compare_sym(struct symbol_hash *s1, struct symbol_hash *s2)
Source File:
src/modules.c

_compare_uid

Declaration:
  inline static int _compare_uid(idmap_t *m1, idmap_t *m2)
Source File:
modules/mod_auth_unix.c

_copy_global_to_all

Declaration:
  void _copy_global_to_all(xaset_t *set)
Source File:
src/dirtree.c

_copy_recur

Declaration:
  void _copy_recur(xaset_t **set, pool *p, config_rec *c, config_rec *new_parent)
Source File:
src/dirtree.c

_create_inet_pool

Declaration:
  static void _create_inet_pool(void)
Source File:
src/inet.c

_dir_check_op

Declaration:
  static int _dir_check_op(pool *p, xaset_t *c, int op, int uid, int gid, int mode)
Source File:
src/dirtree.c

_dispatch

Declaration:
 static int _dispatch(cmd_rec *cmd, int cmd_type, int validate, char *match)
Source File:
src/main.c

_dispatch_auth

Declaration:
  static modret_t *_dispatch_auth(cmd_rec *cmd, char *match)
Source File:
src/auth.c

_do_auth

Declaration:
  static int _do_auth(pool *p, xaset_t *conf, char *u, char *pw)
Source File:
modules/mod_auth.c

_dup_low_fd

Declaration:
  static int _dup_low_fd(int fd)
Source File:
src/main.c

_exists

Declaration:
  static int _exists(char *path, int dirp)
Comments: This function simply checks for the existence of the given path, as modified by the dirp argument.

If dirp == 1, returns FALSE unless path is an existing directory. If dirp == 0, returns FALSE unless path is an existing non-directory. If dirp == -1, returns FALSE unless path exists; the caller in this case does not care whether path is a file or a directory.

Source File:
src/support.c

_find_best_dir

Declaration:
  static config_rec *_find_best_dir(xaset_t *set, char *path, int *matchlen)
Comments: Recursively find the most appropriate place to which to move a
CONF_DIR directive.

Source File: src/dirtree.c

_find_ls_limit

Declaration:
  static config_rec *_find_ls_limit(char *ftp_cmd)
Source File:
modules/mod_ls.c

_get_default_chdir

Declaration:
  static char *_get_default_chdir(pool *p, xaset_t *conf)
Source File:
modules/mod_auth.c

_get_default_root

Declaration:
  static char *_get_default_root(pool *p)
Source File:
modules/mod_auth.c

_get_full_cmd

Declaration:
  static char *_get_full_cmd(cmd_rec *cmd)
Source File:
modules/mod_site.c

_get_gmtoff

Declaration:
  struct tm *_get_gmtoff(int *tz)
Source File:
modules/mod_log.c

_get_ppw_info

Declaration:
  static char *_get_ppw_info(pool *p, const char *u)
Source File:
modules/mod_auth_unix.c

_get_pw_info

Declaration:
  static char *_get_pw_info(pool *p, const char *u, time_t *lstchg, time_t *min, time_t *max,
    time_t *warn, time_t *inact, time_t *expire)
Source File:
modules/mod_auth_unix.c

_internal_abort

Declaration:
  static void _internal_abort(void)
Source File:
src/main.c

_log_transfer

Declaration:
  static void _log_transfer(char direction, char abort_flag)
Source File:
modules/mod_xfer.c

_make_cmd

Declaration:
  static cmd_rec *_make_cmd(pool *cp, int argc, ...)
Source File:
src/auth.c

_mergedown

Declaration:
 static void _mergedown(xaset_t *set, int dynamic)
Source File:
src/dirtree.c

_parse_classes

Declaration:
  static int _parse_classes(char *s)
Source File:
modules/mod_log.c

_parse_options

Declaration:
  void _parse_options(char **opt, int *glob_flags)
Source File:
modules/mod_ls.c

_prepare_core

Declaration:
  static char *_prepare_core(void)
Source File:
src/main.c

_rate_diffusec

Declaration:
  static float _rate_diffusec(struct timeval tlast, struct timeval t)
Comments: This function calculates the difference, in microseconds, between timeval's.

Source File:
modules/mod_xfer.c

_rate_throttle

Declaration:
  static void _rate_throttle(unsigned long rate_pos, long rate_bytes, struct timeval rate_tvlast,
    long rate_freebytes, long rate_bps, int rate_hardbps)
Source File:
modules/mod_xfer.c

_recur_match_path

Declaration:
  static config_rec *_recur_match_path(pool *p, xaset_t *si, char *path)
Source File:
src/dirtree.c

_reorder_dirs

Declaration:
  static void _reorder_dirs(xaset_t *set, int mask)
Comments: Reorder all the
CONF_DIR configuration sections in the given set so that they are in directory tree order.

Source File: src/dirtree.c

_reparent_all

Declaration:
  static void _reparent_all(config_rec *newparent, xaset_t *set)
Comments: Move all the members (i.e. a "branch") of the given configuration set to a different configuration set, newparent.

Source File:
src/dirtree.c

_set_oobinline

Declaration:
  void _set_oobinline(int fd)
Source File:
src/inet.c

_set_owner

Declaration:
  void _set_owner(int fd)
Source File:
src/inet.c

_sethide

Declaration:
  MODRET _sethide(cmd_rec *cmd, const char *param)
Source File:
modules/mod_ls.c

_setup_environment

Declaration:
  static int _setup_environment(pool *p, char *user, char *pass)
Comments: This function really need to be broken up, rearranged!

Source File:
modules/mod_auth.c

_stor_chown

Declaration:
  static void _stor_chown(void)
Source File:
modules/mod_xfer.c

_strmatch

Declaration:
  static int _strmatch(register char *s1, register char *s2)
Comments: Returns the number of characters which match, character for character, in the given strings s1 and s2.

Source File:
src/dirtree.c

_symlink

Declaration:
  static mode_t _symlink(char *path, ino_t last_inode, int rcount)
Comments: Returns the mode_t, including file type, of the file pointed to by the symlink path, or 0 if the pointed to file does not exist (i.e. path is a dangling symlink). This recursing function catches symlink loops via the last_inode and rcount arguments.

Source File:
src/support.c

_transmit_data

Declaration:
  static long _transmit_data(int rate_bps, unsigned long count, off_t offset, char *buf, long bufsize)
Source File:
modules/mod_xfer.c

_transmit_normal

Declaration:
  static int _transmit_normal(char *buf, long bufsize)
Source File:
modules/mod_xfer.c

_transmit_sendfile

Declaration:
  static int _transmit_sendfile(int rate_bps, unsigned long count, off_t offset, pr_sendfile_t *retval)
Source File:
modules/mod_xfer.c

_xlate_ascii_read

Declaration:
  static int _xlate_ascii_read(char *buf, int *bufsize, int *adjlen)
Source File:
src/data.c

_xlate_ascii_write

Declaration:
  static int _xlate_ascii_write(char **buf, int *bufsize, int *adjlen)
Source File:
src/data.c

accept_binding

Declaration:
  conn_t *accept_binding(fd_set *rfd, int *lfd)
Source File:
src/main.c

access_check

Declaration:
  int access_check(char *path, int mode)
Comments: This function performs access checks much like access(2), except that the process's effective user ID and group ID are used (access(2) uses the real user ID and group ID). As with access(2), mode is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, W_OK, and X_OK request checking whether the path exists and has read, write, and execute permissions, respectively. F_OK requests merely checking for the existence of path. 0 is returned if acccess is granted, -1 if denied, with errno set appropriately.

Source File:
src/support.c

add_allow

Declaration:
  MODRET add_allow(cmd_rec *cmd)
Comments: Configuration directive handler for the Allow directive.

Source File:
modules/mod_core.c

add_allowgroup

Declaration:
  MODRET add_allowgroup(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowGroup directive.

Source File:
modules/mod_core.c

add_allowuser

Declaration:
  MODRET add_allowuser(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowUser directive.

Source File:
modules/mod_core.c

add_anonymous

Declaration:
  MODRET add_anonymous(cmd_rec *cmd)
Comments: Configuration directive handler for the <Anonymous> directive.

Source File:
modules/mod_core.c

add_anonymousgroup

Declaration:
  MODRET add_anonymousgroup(cmd_rec *cmd)
Comments: Configuration directive handler for the AnonymousGroup directive.

Source File:
modules/mod_core.c

add_bind

Declaration:
  MODRET add_bind(cmd_rec *cmd)
Comments: Configuration directive handler for the Bind directive.

Source File:
modules/mod_core.c

add_binding

Declaration:
  int add_binding(server_rec *server, p_in_addr_t *ipaddr, conn_t *listen, char isdefault,
    char islocalhost)
Source File:
src/main.c

add_cdir

Declaration:
 static cdir_t *add_cdir(class_t *class, u_int_32 address, u_int_8 netmask)
Source File:
modules/mod_core.c

add_cdpath

Declaration:
  MODRET add_cdpath(cmd_rec *cmd)
Comments: Configuration directive handler for the CDPath directive.

Source File:
modules/mod_core.c

add_class

Declaration:
  static class_t *add_class(char *name)
Source File:
modules/mod_core.c

add_config

Declaration:
  config_rec *add_config(const char *name)
Comments: Adds a config_rec on the current "level" of the configuration stack. This is used during the parsing of configuration files.

Source File:
src/dirtree.c

add_config_param

Declaration:
  config_rec *add_config_param(const char *name, int num, ...)
Comments: Adds a config_rec to the server's set with name name. The added config_rec will have num arguments, each of which must a void * pointers to data. The given number of pointers num must follow. If planning to set those additional arguments manually, after this call, at least use NULL as a placeholder in the argument list. This function, being a varargs function, will happily copy garbage from the stack into the created config_rec if an insufficient number of pointers follow the num argument.

Source File:
src/dirtree.c

add_config_param_set

Declaration:
  config_rec *add_config_param_set(xaset_t **set, const char *name, int num, ...)
Source File:
src/dirtree.c

add_config_param_str

Declaration:
  config_rec *add_config_param_str(const char *name, int num, ...)
Comments: Similar to
add_config_param(), except that the given pointers are all assumed to be strings. pstrdup() will be called on each pointer, using permanent_pool as the pool.

Source File: src/dirtree.c

add_config_set

Declaration:
  config_rec *add_config_set(xaset_t **set, const char *name)
Comments: Adds a config_rec to the given xaset_t set, giving that config_rec the name name.

Source File:
src/dirtree.c

add_defaultchdir

Declaration:
  MODRET add_defaultchdir(cmd_rec *cmd)
Comments: Configuration directive handler for the DefaultChdir directive.

Source File:
modules/mod_auth.c

add_defaultroot

Declaration:
  MODRET add_defaultroot(cmd_rec *cmd)
Comments: Configuration directive handler for the DefaultRoot directive.

Source File:
modules/mod_auth.c

add_define

Declaration:
  MODRET add_define(cmd_rec *cmd)
Comments: Configuration directive handler for the Define directive.

Source File:
modules/mod_core.c

add_deny

Declaration:
  MODRET add_deny(cmd_rec *cmd)
Comments: Configuration directive handler for the Deny directive.

Source File:
modules/mod_core.c

add_denygroup

Declaration:
  MODRET add_denygroup(cmd_rec *cmd)
Comments: Configuration directive handler for the DenyGroup directive.

Source File:
modules/mod_core.c

add_denyuser

Declaration:
  MODRET add_denyuser(cmd_rec *cmd)
Comments: Configuration directive handler for the DenyUser directive.

Source File:
modules/mod_core.c

add_directory

Declaration:
  MODRET add_directory(cmd_rec *cmd)
Comments: Configuration directive handler for the <Directory> directive.

Source File:
modules/mod_core.c

add_extendedlog

Declaration:
  MODRET add_extendedlog(cmd_rec *cmd)
Comments: Configuration directive handler for the ExtendedLog directive.

Source File:
modules/mod_log.c

add_global

Declaration:
  MODRET add_global(cmd_rec *cmd)
Comments: Configuration directive handler for the <Global> directive.

Source File:
modules/mod_core.c

add_groupowner

Declaration:
  MODRET add_groupowner(cmd_rec *cmd)
Comments: Configuration directive handler for the GroupOwner directive.

Source File:
modules/mod_core.c

add_hidegroup

Declaration:
  MODRET add_hidegroup(cmd_rec *cmd)
Comments: Configuration directive handler for the HideGroup directive.

Source File:
modules/mod_core.c

add_hideuser

Declaration:
  MODRET add_hideuser(cmd_rec *cmd)
Comments: Configuration directive handler for the HideUser directive.

Source File:
modules/mod_core.c

add_hostname

Declaration:
  static hostname_t *add_hostname(class_t *class, char *name)
Source File:
modules/mod_core.c

add_include

Declaration:
  MODRET add_include(cmd_rec *cmd)
Comments: Configuration directive handler for the Include directive.

Source File:
modules/mod_core.c

add_limit

Declaration:
  MODRET add_limit(cmd_rec *cmd)
Comments: Configuration directive handler for the <Limit> directive.

Source File:
modules/mod_core.c

add_logformat

Declaration:
  MODRET add_logformat(cmd_rec *cmd)
Comments: Configuration directive handler for the LogFormat directive.

Source File:
modules/mod_log.c

add_masqueradeaddress

Declaration:
  MODRET add_masqueradeaddress(cmd_rec *cmd)
Comments: Configuration directive handler for the MasqueradeAddress directive.

Source File:
modules/mod_core.c

add_meta

Declaration:
  static void add_meta(unsigned char **s, unsigned char meta, int args, ...)
Source File:
modules/mod_log.c

add_order

Declaration:
  MODRET add_order(cmd_rec *cmd)
Comments: Configuration directive handler for the Order directive.

Source File:
modules/mod_core.c

add_ratebool

Declaration:
  MODRET add_ratebool(cmd_rec *cmd)
Comments: Configuration directive handler for the RateReadHardBPS and RateWriteHardBPS directives.

Source File:
modules/mod_xfer.c

add_ratenum

Declaration:
  MODRET add_ratenum(cmd_rec *cmd)
Comments: Configuration directive handler for the RateReadBPS, RateReadFreeBytes, RateWriteBPS, and RateWriteFreeBytes directives.

Source File:
modules/mod_xfer.c

add_timer

Declaration:
  int add_timer(int seconds, int timerno, module *mod, callback_t cb)
Comments: Create and activate a new timer with an interval seconds, a timer ID number of timerno, and a callback of cb. Note that if a timerno of -1 is given, a "dynamic" timer ID number will be assigned. The timerno of the timer is returned.

Source File:
src/timers.c

add_transferlog

Declaration:
  MODRET add_transferlog(cmd_rec *cmd)
Comments: Configuration directive handler for the TransferLog directive.

Source File:
modules/mod_core.c

add_userdirroot

Declaration:
  MODRET add_userdirroot (cmd_rec *cmd)
Comments: Configuration directive handler for the UserDirRoot directive.

Source File:
modules/mod_auth.c

add_userowner

Declaration:
  MODRET add_userowner(cmd_rec *cmd)
Comments: Configuration directive handler for the UserOwner directive.

Source File:
modules/mod_core.c

add_virtualhost

Declaration:
  MODRET add_virtualhost(cmd_rec *cmd)
Comments: Configuration directive handler for the <VirtualHost> directive.

Source File:
modules/mod_core.c

addfile

Declaration:
  static void addfile(cmd_rec *cmd, const char *name, const char *suffix, time_t mtime)
Source File:
modules/mod_ls.c

addl_bindings

Declaration:
  void addl_bindings(server_rec *s)
Comments: On startup, once the configuration file has been parsed, this function is called. It loops through the given server s's configuration records, and for each Bind directive found, it will create an additional
binding_t for that server's IP address and port.

Source File: src/main.c

allow_dyn_config

Declaration:
  static int allow_dyn_config(void)
Comments:

Source File:
src/dirtree.c

append_arrays

Declaration:
  array_header *append_arrays(pool *p, const array_header *first, const array_header *second)
Comments: Using memory from pool p, copy array_header first, then append array_header second to it, and return a pointer to the concatenated array_headers.

Source File:
src/pool.c

array_cat

Declaration:
  void array_cat(array_header *dst, const array_header *src)
Comments: Concatenate the elements from array_header src to the elements of array_header dst.

Source File:
src/pool.c

auth_acct

Declaration:
  MODRET auth_acct(cmd_rec *cmd)
Comments: Command handler for the ACCT FTP command.

Source File:
modules/mod_auth.c

auth_authenticate

Declaration:
  int auth_authenticate(pool *p, const char *name, const char *pw)
Comments: Dispatcher for the auth() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a higher-level "yes or no" answer of whether a the given user name is successfully authenticated by the given cleartext password pw.

Source File:
src/auth.c

auth_check

Declaration:
  int auth_check(pool *p, const char *cpw, const char *name, const char *pw)
Comments: Dispatcher for the check() authentication handler.

The purpose of the dispatched-to authentication handler is to, given the hashed password cpw, the username name, and the cleartext password pw, and using whatever method the module developer desires, determine whether the hashed password is sufficient and proper for that user, if the the cleartext password belongs to that user.

Source File:
src/auth.c

auth_check_ftpusers

Declaration:
  static unsigned char auth_check_ftpusers(xaset_t *set, const char *user)
Comments: Check the given user against a list of prohibited users, usually contained in /etc/ftpusers, a file used by wu-ftpd servers. This check can be skipped by using the UseFtpUsers configuration directive.

Source File:
modules/mod_auth.c

_auth_check_shell

Declaration:
  static unsigned char auth_check_shell(xaset_t *set, const char *shell)
Comments: Check the given shell of the connecting user against a list of valid system shells, usually contained in /etc/shells. This check can be skipped by using the RequireValidShell configuration directive.

Source File:
modules/mod_auth.c

auth_cmd_chk_cb

Declaration:
  static int auth_cmd_chk_cb(cmd_rec *cmd)
Source File:
modules/mod_auth.c

auth_count_scoreboard

Declaration:
  static void auth_count_scoreboard(cmd_rec *cmd, char *user)
Source File:
modules/mod_auth.c

auth_endgrent

Declaration:
  void auth_endgrent(pool *p)
Comments: Dispatcher for the endgrent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the endgrent(3) libc function.

Source File:
src/auth.c

auth_endpwent

Declaration:
  void auth_endpwent(pool *p)
Comments: Dispatcher for the endpwent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the endpwent(3) libc function.

Source File:
src/auth.c

auth_getgrent

Declaration:
  struct group *auth_getgrent(pool *p)
Comments: Dispatcher for the getgrent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getgrent(3) libc function.

Source File:
src/auth.c

auth_getgrgid

Declaration:
  struct group *auth_getgrgid(pool *p, gid_t gid)
Comments: Dispatcher for the getgrgid() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getgrgid(3) libc function.

Source File:
src/auth.c

auth_getgrnam

Declaration:
  struct group *auth_getgrnam(pool *p, const char *name)
Comments: Dispatcher for the getgrnam() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getgrnam(3) libc function.

Source File:
src/auth.c

auth_getpwent

Declaration:
  struct passwd *auth_getpwent(pool *p)
Comments: Dispatcher for the getpwent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getpwent(3) libc function.

Source File:
src/auth.c

auth_getpwnam

Declaration:
  struct passwd *auth_getpwnam(pool *p, const char *name)
Comments: Dispatcher for the getpwnam() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getpwnam(3) libc function.

Source File:
src/auth.c

auth_getgroups

Declaration:
  struct passwd *auth_getgroups(pool *p, const char *name, array_header **group_ids,
    array_header **group_names)
Comments: Dispatcher for the getgroups() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getgroups(2) system call.

Source File:
src/auth.c

auth_getpwuid

Declaration:
  struct passwd *auth_getpwuid(pool *p, uid_t uid)
Comments: Dispatcher for the getpwuid() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the getpwuid(3) libc function.

Source File:
src/auth.c

auth_gid_name

Declaration:
  const char *auth_gid_name(pool *p, gid_t gid)
Comments: Dispatcher for the gid_name() authentication handler.

The purpose of the dispatched-to authentication handler is to do a GID-to-name lookup for the given GID gid.

Source File:
src/auth.c

auth_init

Declaration:
  static int auth_init(void)
Source File:
modules/mod_auth.c

auth_login_timeout_cb

Declaration:
  static int auth_login_timeout_cb(CALLBACK_FRAME)
Comments: Timer callback function which disconnects the control connection if the timer has elapsed before the client has successfully authenticated. The timer length is configurable via the TimeoutLogin configuration directive.

Source File:
modules/mod_auth.c

auth_name_gid

Declaration:
  gid_t auth_name_gid(pool *p, const char *name)
Comments: Dispatcher for the name_gid() authentication handler.

The purpose of the dispatched-to authentication handler is to do a name-to-GID lookup for the given group name.

Notes: The caller of this function must take due caution when handling the returned gid_t, and treat a gid_t of -1 properly.

Source File:
src/auth.c

auth_name_uid

Declaration:
  uid_t auth_name_uid(pool *p, const char *name)
Comments: Dispatcher for the name_uid() authentication handler.

The purpose of the dispatched-to authentication handler is to do a name-to-UID lookup for the given user name.

Notes: The caller of this function must take due caution when handling the returned uid_t, and treat a uid_t of -1 properly.

Source File:
src/auth.c

auth_pass

Declaration:
  MODRET auth_pass(cmd_rec *cmd)
Comments: Command handler for the PASS FTP command.

Source File:
modules/mod_auth.c

auth_post_pass

Declaration:
  MODRET auth_post_pass(cmd_rec *cmd)
Source File:
modules/mod_auth.c

auth_pre_pass

Declaration:
  MODRET auth_pre_pass(cmd_rec *cmd)
Source File:
modules/mod_auth.c

auth_pre_user

Declaration:
  MODRET auth_pre_user(cmd_rec *cmd)
Source File:
modules/mod_auth.c

auth_rein

Declaration:
  MODRET auth_rein(cmd_rec *cmd)
Comments: Command handler for the REIN FTP command.

Source File:
modules/mod_auth.c

auth_scan_scoreboard

Declaration:
  static void auth_scan_scoreboard(void)
Source File:
modules/mod_auth.c

auth_sess_init

Declaration:
  static int auth_sess_init(void)
Source File:
modules/mod_auth.c

auth_setgrent

Declaration:
  void auth_setgrent(pool *p)
Comments: Dispatcher for the setgrent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the setgrent(3) libc function.

Source File:
src/auth.c

auth_setpwent

Declaration:
  void auth_setpwent(pool *p)
Comments: Dispatcher for the setpwent() authentication handler.

The purpose of the dispatched-to authentication handler is to provide a custom implementation of the setpwent(3) libc function.

Source File:
src/auth.c

auth_uid_name

Declaration:
  const char *auth_uid_name(pool *p, uid_t uid)
Comments: Dispatcher for the uid_name() authentication handler.

The purpose of the dispatched-to authentication handler is to do a UID-to-name lookup for the given UID uid.

Source File:
src/auth.c

auth_user

Declaration:
  MODRET auth_user(cmd_rec *cmd)
Comments: Command handler for the USER FTP command.

Source File:
modules/mod_auth.c

build_dyn_config

Declaration:
  void build_dyn_config(pool *p, char *_path, struct stat *_sbuf, int recurse)
Comments: This function looks through each directory in _path, from the "deepest" up, looking for new or updated .ftpaccess files. All .ftpaccess files are considered to be placed within a <Directory>; within the .ftpaccess file itself, all configuration directives are considered to be in a dynamic context (
CONF_DYNDIR to be specific). .ftpaccess files that have been updated are reparsed; files that once contained directives, but are now empty or deleted are removed from the configuration records.

Source File: src/dirtree.c

bytes_in_block_list

Declaration:
  long bytes_in_block_list(union block_hdr *blok)
Comments: Return the number of bytes in the given union block_header.

Source File:
src/pool.c

call_module

Declaration:
  modret_t *call_module(module *m, modret_t *(*func)(cmd_rec *), cmd_rec *cmd)
Source File:
src/modules.c

call_module_auth

Declaration:
  modret_t *call_module_auth(module *mi, modret_t *(*func)(cmd_rec *), cmd_rec *cmd)
Source File:
src/modules.c

call_module_cmd

Declaration:
  modret_t *call_module_cmd(module *m, modret_t *(*func)(cmd_rec *), cmd_rec *cmd)
Source File:
src/modules.c

check_context

Declaration:
  unsigned char check_context(cmd_rec *cmd, int allowed)
Source File:
src/dirtree.c

check_shutmsg

Declaration:
  int check_shutmsg(time_t *shut, time_t *deny, time_t *disc, char *msg, size_t msg_size)
Comments: Checks for the existence of
SHUTMSG_PATH, the shutdown message file. deny and disc are filled with the times at which to deny new connections and to disconnect existing ones, respectively.

Source File: src/support.c

chk_on_blk_list

Declaration:
  void chk_on_blk_list(union block_hdr *blok, union block_hdr *free_blk)
Comments: A debugging function, it walks the given union block_hdr free_blk, making sure that none of the chained union block_hdrs point to union block_hdr blok.

Source File:
src/pool.c

clear_inet_pool

Declaration:
  void clear_inet_pool(void)
Source File:
src/inet.c

clear_pool

Declaration:
  static void clear_pool(struct pool *p)
Comments: Frees up the resources used by pool p. Does not destroy pool p when finished.

Source File:
src/pool.c

cmd_loop

Declaration:
  void cmd_loop(server_rec *server, conn_t *c)
Source File:
src/main.c

cmp

Declaration:
  static int cmp(const void *a, const void *b)
Source File:
modules/mod_ls.c

conn_cleanup_cb

Declaration:
  static void conn_cleanup_cb(void *cv)
Source File:
src/inet.c

copy_array

Declaration:
  array_header *copy_array(pool *p, const array_header *arr)
Comments: Returns a pointer to an array_header that is a copy of arr, using resources from pool p.

Source File:
src/pool.c

copy_array_hdr

Declaration:
  array_header *copy_array_hdr(pool *p, const array_header *arr)
Comments: Returns a pointer to an array_header which contains duplicate pointers to the original elements of array_header arr, using the resources of pool p.

Source File:
src/pool.c

copy_array_str

Declaration:
  array_header *copy_array_str(pool *p, const array_header *arr)
Comments: Returns a pointer to an array_header which contains duplicate elements (i.e. strings) of the original elements of array_header arr, allocated from the resources of pool p.

Source File:
src/pool.c

core_cdup

Declaration:
  MODRET core_cdup(cmd_rec *cmd)
Comments: Command handler for the CDUP FTP command.

Source File:
modules/mod_core.c

core_chgrp

Declaration:
  int core_chgrp(cmd_rec *cmd, char *dir, uid_t uid, gid_t gid)

Source File:
modules/mod_core.c

core_chmod

Declaration:
  int core_chmod(cmd_rec *cmd, char *dir, mode_t mode)

Source File:
modules/mod_core.c

core_cwd

Declaration:
  MODRET core_cwd(cmd_rec *cmd)
Comments: Command handler for the CWD and XCWD FTP commands.

Source File:
modules/mod_core.c

core_dele

Declaration:
  MODRET core_dele(cmd_rec *cmd)
Comments: Command handler for the DELE FTP command.

Source File:
modules/mod_core.c

core_display_file

Declaration:
  int core_display_file(const char *numeric, const char *fn, const char *fs)
Comments: Displays the file fn, which lives on the filesystem fs, via the given response numeric. The file is displayed in normal RFC959 multiline mode, unless MultilineRFC2228 is set.

This function returns -1 on error, or 0 if the file is displayed without trouble.

Source File:
modules/mod_core.c

core_help

Declaration:
  MODRET core_help(cmd_rec *cmd)
Comments: Command handler for the HELP FTP command.

Source File:
modules/mod_core.c

core_mdtm

Declaration:
  MODRET cmd_mdtm(cmd_rec *cmd)
Comments: Command handler for the MDTM FTP command.

Source File:
modules/mod_core.c

core_mkd

Declaration:
  MODRET core_mkd(cmd_rec *cmd)
Comments: Command handler for the MKD FTP command.

Source File:
modules/mod_core.c

core_netio_abort_cb

Declaration:
  static void core_netio_abort_cb(pr_netio_stream_t *nstrm)

Source File:
src/netio.c

core_netio_close_cb

Declaration:
  static int core_netio_close_cb(pr_netio_stream_t *nstrm)

Source File:
src/netio.c

core_netio_open_cb

Declaration:
  static pr_netio_stream_t *core_netio_open_cb(pr_netio_stream_t *nstrm, int fd, int mode)

Source File:
src/netio.c

core_netio_poll_cb

Declaration:
  static int core_netio_poll_cb(pr_netio_stream_t *nstrm)

Source File:
src/netio.c

core_netio_postopen_cb

Declaration:
  static int core_netio_postopen_cb(pr_netio_stream_t *nstrm)

Source File:
src/netio.c

core_netio_read_cb

Declaration:
  static int core_netio_read_cb(pr_netio_stream_t *nstrm, char *buf, size_t buflen)

Source File:
src/netio.c

core_netio_reopen_cb

Declaration:
  static pr_netio_stream_t *core_netio_reopen_cb(pr_netio_stream_t *nstrm, int fd, int mode)

Source File:
src/netio.c

core_netio_shutdown_cb

Declaration:
  static int core_netio_shutdown_cb(pr_netio_stream_t *nstrm, int how)

Source File:
src/netio.c

core_netio_write_cb

Declaration:
  static int core_netio_write_cb(pr_netio_stream_t *nstrm, char *buf, size_t buflen)

Source File:
src/netio.c

core_noop

Declaration:
  MODRET core_noop(cmd_rec *cmd)
Comments: Command handler for the NOOP FTP command.

Source File:
modules/mod_core.c

core_pasv

Declaration:
  MODRET core_pasv(cmd_rec *cmd)
Comments: Command handler for the PASV FTP command.

Source File:
modules/mod_core.c

core_port

Declaration:
  MODRET core_port(cmd_rec *cmd)
Comments: Command handler for the PORT FTP command.

Source File:
modules/mod_core.c

core_pwd

Declaration:
  MODRET core_pwd(cmd_rec *cmd)
Comments: Command handler for the PWD FTP command.

Source File:
modules/mod_core.c

core_quit

Declaration:
  MODRET core_quit(cmd_rec *cmd)
Comments: Command handler for the QUIT FTP command.

Source File:
modules/mod_core.c

core_rehash_cb

Declaration:
  static void core_rehash_cb(void *d1, void *d2, void *d3, void *d4)
Source File:
src/main.c

core_rmd

Declaration:
  MODRET core_rmd(cmd_rec *cmd)
Comments: Command handler for the RMD FTP command.

Source File:
modules/mod_core.c

core_rnfr

Declaration:
  MODRET core_rnfr(cmd_rec *cmd)
Comments: Command handler for the RNFR FTP command.

Source File:
modules/mod_core.c

core_rnto

Declaration:
  MODRET core_rnto(cmd_rec *cmd)
Comments: Command handler for the RNTO FTP command.

Source File:
modules/mod_core.c

core_size

Declaration:
  MODRET core_size(cmd_rec *cmd)
Comments: Command handler for the SIZE FTP command.

Source File:
modules/mod_core.c

core_syst

Declaration:
  MODRET core_syst(cmd_rec *cmd)
Comments: Command handler for the SYST FTP command.

Source File:
modules/mod_core.c

create_home

Declaration:
  int create_home(pool *p, const char *home, const char *user, uid_t uid, gid_t gid)
Source File:
src/mkhome.c

daemon_loop

Declaration:
  void daemon_loop(void)
Source File:
src/main.c

daemonize

Declaration:
  static void daemonize(void)
Source File:
src/main.c

data_abort

Declaration:
  void data_abort(int err, int quiet)
Source File:
src/data.c

data_active_open

Declaration:
  static int data_active_open(char *reason, unsigned long size)
Source File:
src/data.c

data_cleanup

Declaration:
  void data_cleanup(void)
Source File:
src/data.c

data_close

Declaration:
  void data_close(int quiet)
Source File:
src/data.c

data_init

Declaration:
  void data_init(char *filename, int direction)
Source File:
src/data.c

data_new_xfer

Declaration:
  static void data_new_xfer(char *filename, int direction)
Source File:
src/data.c

data_open

Declaration:
  int data_open(char *filename, char *reason, int direction, unsigned long size)
Source File:
src/data.c

data_pasv_open

Declaration:
  static int data_pasv_open(char *reason, unsigned long size)
Source File:
src/data.c

data_reset

Declaration:
  void data_reset(void)
Source File:
src/data.c

data_sendfile

Declaration:
  pr_sendfile_t data_sendfile(int retr_fd, off_t *offset, size_t count)
Source File:
src/data.c

data_urgent

Declaration:
  RETSIGTYPE data_urgent(int sig)
Comments: Signal handler for the SIGURG signal, to be raised if OOB data is received on the control connection while a data transfer is in progress. This handler sets the SF_ABORT session flag and aborts the current transfer.

Source File:
src/data.c

data_xfer

Declaration:
  int data_xfer(char *cl_buf, int cl_size)
Comments: This function actually performs the work of transferring data on the data connection. ASCII translation is performed if necessary. The direction of the transfer, set when the data connection was opened, determines whether the client buffer cl_buf is read from or written to.

Returns 0 if successful, or if reading and the data connection closes; -1 on error.

Source File:
src/data.c

debug_dump_config

Declaration:
  void debug_dump_config(xaset_t *s, char *indent)
Source File:
src/dirtree.c

debug_pool_info

Declaration:
  void debug_pool_info(void)
Comments: Debugging function, for debugging pool resource management.

Source File:
src/pool.c

debug_walk_pools

Declaration:
  void debug_walk_pools(void)
Comments: Self-explanatory function, it does just what its name says.

Source File:
src/pool.c

destroy_pool

Declaration:
  void destroy_pool(pool *p)
Comments: Completely frees the resources used by pool p and its subpools. Destroys the pool p when finished.

Source File:
src/pool.c

dir_abs_path

Declaration:
  char *dir_abs_path(pool *p, const char *path, int interpolate)
Comments: Takes a directory path and returns its corresponding absolute path, which is based on the root directory, not on a chrooted directory (i.e. chroot() does not affect the absolute path). If interpolate is TRUE, ~username references will be interpolated appropriately.

Source File:
src/support.c

dir_best_path

Declaration:
  char *dir_best_path(pool *p, const char *path)
Comments: This function creates the most fully canonicalized path possible, i.e. if path components at the end of path do not exist, they are ignored.

Source File:
src/support.c

dir_canonical_path

Declaration:
  char *dir_canonical_path(pool *p, const char *path)
Comments: Takes a directory path and returns its corresponding canonical path, which is based on the current working directory (i.e. chroot() does affect the canonical path). ~username references are interpolated.

Source File:
src/support.c

dir_check

Declaration:
  int dir_check(pool *pp, char *cmd, char *group, char *path, int *hidden)
Comments: This function checks the current directory configuration against the given path. If the current directory partially matches the path, a search is done only in the contained sub-configurations, otherwise the check is handed off to
dir_check_full().

Source File: src/dirtree.c

dir_check_canon

Declaration:
  int dir_check_canon(pool *pp, char *cmd, char *group, char *path, int *hidden)
Source File:
src/dirtree.c

dir_check_full

Declaration:
  int dir_check_full(pool *pp, char *cmd, char *group, char *path, int *hidden)
Comments: This function fully walks the given path.

It returns TRUE if an operation is allowed on the current path, else it returns FALSE.

Source File:
src/dirtree.c

dir_check_limits

Declaration:
  int dir_check_limits(config_rec *c, char *cmd, int hidden)
Source File:
src/dirtree.c

dir_check_op_mode

Declaration:
  int dir_check_op_mode(pool *p, char *path, int op, int uid, int gid, int mode)
Source File:
src/dirtree.c

dir_exists

Declaration:
  int dir_exists(char *path)
Comments: Returns TRUE if path exists and is a directory, FALSE otherwise.

Source File:
src/support.c

dir_hide_file

Declaration:
  unsigned char dir_hide_file(const char *path)
Source File:
src/dirtree.c

dir_interpolate

Declaration:
  char *dir_interpolate(pool *p, const char *path)
Comments: This function interpolates the given path, expanding the ~ notation if necessary.

Source File:
src/support.c

dir_match_path

Declaration:
  config_rec *dir_match_path(pool *p, char *path)
Comments: If the given path ends in "*", strip it off. Then, if path ends in "/", strip it off, too.

Notes: For this function to work correctly, the path given must be an absolute path. This is particularly important when working with paths during anonymous sessions, for in such sessions the paths are modified by the chroot()ing of anonymous sessions. As in other places in the core code, it is wise to have logic such as this before calling dir_match_path():
    config_rec *dir_config = NULL;
    char *fullpath = path;

    if (session.anon_config)
      fullpath = pdircat(p, session.anon_root, path, NULL);

    dir_config = dir_match_path(p, fullpath);
Source File:
src/dirtree.c

dir_realpath

Declaration:
  char *dir_realpath(pool *p, const char *path)
Comments: This function is needed to properly dereference symlinks, for
pr_fs_getcwd() may not work if permissions cause problems somewhere up the tree.

Source File: src/support.c

dir_virtual_chdir

Declaration:
  char *dir_virtual_chdir(pool *p, const char *path)
Source File:
src/support.c

disc_children

Declaration:
  void disc_children(void)
Comments: This function causes SIGUSR1 to be sent to all children processed, terminating them, thus "disconnecting": those clients.

Source File:
src/main.c

discard_output

Declaration:
  void discard_output(void)
Source File:
modules/mod_ls.c

dispatch_cmd

Declaration:
  static void dispatch_cmd(cmd_rec *cmd)
Source File:
src/main.c

do_log

Declaration:
  void do_log(cmd_rec *cmd, logfile_t *lf)
Source File:
modules/mod_log.c

dolist

Declaration:
  int dolist(cmd_rec *cmd, const char *opt, int clearflags)
Source File:
modules/mod_ls.c

end_anonymous

Declaration:
  MODRET end_anonymous(cmd_rec *cmd)
Comments: Configuration directive handler for the </Anonymous> directive.

Source File:
modules/mod_core.c

end_directory

Declaration:
  MODRET end_directory(cmd_rec *cmd)
Comments: Configuration directive handler for the </Directory> directive.

Source File:
modules/mod_core.c

end_ifdefine

Declaration:
  MODRET end_ifdefine(cmd_rec *cmd)
Comments: Configuration directive handler for the </IfDefine> directive.

Source File:
modules/mod_core.c

end_ifmodule

Declaration:
  MODRET end_ifmodule(cmd_rec *cmd)
Comments: Configuration directive handler for the </IfModule> directive.

Source File:
modules/mod_core.c

end_global

Declaration:
  MODRET end_global(cmd_rec *cmd)
Comments: Configuration directive handler for the </Global> directive.

Source File:
modules/mod_core.c

end_limit

Declaration:
  MODRET end_limit(cmd_rec *cmd)
Comments: Configuration directive handler for the </Limit> directive.

Source File:
modules/mod_core.c

end_login

Declaration:
  void end_login(int exitcode)
Comments: Function used for terminating a session. The child process servicing the current session exits with the given exitcode.
end_login_noexit() is invoked before _exit() is used to terminate the process.

Source File: src/main.c

end_login_noexit

Declaration:
  void end_login_noexit(void)
Comments: As part of a session termination, this function is called. All registered exit handlers are run, and all necessary log files are closed.

Source File:
src/main.c

end_new_server

Declaration:
  server_rec *end_new_server(void)
Source File:
src/dirtree.c

end_sub_config

Declaration:
  config_rec *end_sub_config(void)
Source File:
src/dirtree.c

end_virtualhost

Declaration:
  MODRET end_virtualhost(cmd_rec *cmd)
Source File:
modules/mod_core.c

ensure_open_passwd

Declaration:
  static void ensure_open_passwd(pool *p)
Source File:
modules/mod_auth.c

exists

Declaration:
  int exists(char *path)
Source File:
src/support.c

fd_cleanup_cb

Declaration:
  static void fd_cleanup_cb(void *fdv)
Comments: close()s the file descriptor fdv.

Source File:
src/pool.c

fgetbufline

Declaration:
  static char *fgetbufline(char **buf, int *size, FILE *fp)
Source File:
lib/pwgrent.c

fgetgrent

Declaration:
  struct group *fgetgrent(FILE *fp)
Source File:
lib/pwgrent.c

fgetpwent

Declaration:
  struct passwd *fgetpwent(FILE *fp)
Source File:
lib/pwgrent.c

file_child_cleanup_cb

Declaration:
  static void file_child_cleanup_cb(void *fpv)
Comments: close()s the file pointed to by FILE pointer fpv.

Source File:
src/pool.c

file_cleanup_cb

Declaration:
  static void file_cleanup_cb(void *fpv)
Comments: fclose()s the file pointed to by FILE pointer fpv.

Source File:
src/pool.c

file_exists

Declaration:
  int file_exists(char *path)
Comments: Returns TRUE if path exists, FALSE otherwise.

Source File:
src/support.c

file_mode

Declaration:
  mode_t file_mode(char *path)
Source File:
src/support.c

find_binding

Declaration:
  server_rec *find_binding(p_in_addr_t *ipaddr, int port)
Source File:
src/main.c

find_cdir

Declaration:
  static cdir_t *find_cdir(u_int_32 address)
Source File:
modules/mod_core.c

find_class

Declaration:
  class_t *find_class(p_in_addr_t *addr, char *remote_name)
Source File:
modules/mod_core.c

find_config

Declaration:
  config_rec *find_config(xaset_t *set, int type, const char *name, int recurse)
Comments: The recurse parameter should almost always be FALSE. Exceptions to this rule are very rare.

Source File:
src/dirtree.c

find_config_next

Declaration:
  config_rec *find_config_next(config_rec *prev, config_rec *c, int type, const char *name,
    int recurse)
Comments: The recurse parameter should almost always be FALSE. Exceptions to this rule are very rare.

Source File:
src/dirtree.c

find_config_set_top

Declaration:
  void find_config_set_top(config_rec *c)
Source File:
src/dirtree.c

find_hostname

Declaration:
  static hostname_t *find_hostname(char *name)
Source File:
modules/mod_core.c

find_opendir

Declaration:
  static fsdir_t *find_opendir(void *d, int closing)
Source File:
src/fs.c

fixup_dirs

Declaration:
  void fixup_dirs(server_rec *s, int mask)
Source File:
src/dirtree.c

fixup_globals

Declaration:
  void fixup_globals(void)
Source File:
src/dirtree.c

fixup_servers

Declaration:
  void fixup_servers(void)
Comments: Go through each server configuration and complain if important information is missing, after the configuration file(s) have been read. Otherwise, fill in default values where applicable.

Source File:
src/dirtree.c

fmt_time

Declaration:
  char *fmt_time(time_t t)
Source File:
src/log.c

fork_server

Declaration:
  static void fork_server(int fd, conn_t *l, int nofork)
Comments: Forks a child process to handle the session for the requesting client, installing signal handlers and preparing the child process' space for processing client commands. If nofork is TRUE, does not actually fork; this is used mostly for debugging purposes.

Source File:
src/main.c

free_blocks

Declaration:
  void free_blocks(union block_hdr *blok)
Comments: Free a chain of union block_hdrs. Alarms must be blocked before calling this function.

Source File:
src/pool.c

free_conf_stacks

Declaration:
  void free_conf_stacks(void)
Source File:
src/dirtree.c

free_dyn_stacks

Declaration:
  void free_dyn_stacks(void)
Source File:
src/dirtree.c

fs_lookup_dir

Declaration:
  static pr_fh_t *fs_lookup_dir(const char *path, int op)
Comments: This function is called whenever any sort of directory operation, to be performed on a directory or file, is needed. A "closest" match algorithm is used. If the lookup fails or is not "close enough" (i.e. the final target does not exactly match an existing fsdir_t), we can look for matchable targets and call file_hit, then rescan the fsdir_t list. The rescan is performed in case any modules registered FS handlers during the hit.

Source File:
src/fsio.c

fs_lookup_file

Declaration:
  static pr_fh_t *fs_lookup_file(const char *path, char **deref, int op)
Comments: This functions performs a similar function to
fs_lookup_dir(), however, as it performs a file lookup, as opposed to a directory lookup, the target is the subdirectory containing the actual target path. A basic optimization - if the path contains no slashes, pr_fs_cwd() - is used.

Source File: src/fsio.c

fs_lookup_file_canon

Declaration:
  static pr_fh_t *fs_lookup_file_canon(const char *path, char **deref, int op)
Source File:
src/fsio.c

genericlist

Declaration:
  MODRET genericlist(cmd_rec *cmd)
Source File:
modules/mod_ls.c

get_boolean

Declaration:
  int get_boolean(cmd_rec *cmd, int av)
Comments: Check the av argument string in the given cmd as a Boolean value, using a case-insensitive comparison. Valid Boolean strings are: on, off, yes, no, true, false, 1, and 0. Returns 1 if the checked string is a Boolean TRUE, 0 if it is a Boolean FALSE, and -1 to signal that the string is not one of the recognized Boolean strings.

Source File:
src/dirtree.c

get_class

Declaration:
  static class_t *get_class(char *name)
Source File:
modules/mod_core.c

get_command_class

Declaration:
  static int get_command_class(const char *name)
Source File:
src/main.c

get_config_cmd

Declaration:
  cmd_rec *get_config_cmd(pool *ppool, FILE *fp, int *line)
Comments: Reads in a single line from the configuration file fp, then parses that line of text into a configuration directive in the form of a
cmd_rec (allocated from the given pool ppool) which is then dispatched to the appropriate configuration directive handler. line is used to track the current line number being parsed from the configuration file.

Source File: src/dirtree.c

get_context_name

Declaration:
  char *get_context_name(cmd_rec *cmd)
Comments: Returns a string describing the context in which cmd appears; utilized mostly by configuration directive handler functions.

Source File:
src/dirtree.c

get_extendedlogs

Declaration:
  static void get_extendedlogs(void)
Source File:
modules/mod_log.c

get_full_cmd

Declaration:
  char *get_full_cmd(cmd_rec *cmd)
Comments: Returns a string containing the full command issued by a client, including command arguments.

Source File:
src/dirtree.c

get_name_max

Declaration:
  get_name_max(char *dirname, int dir_fd)
Comments: Get the maximum size of a file name, specifically of the pathname component. If a directory file descriptor, ie the dir_fd DIR structure element, is not available, then the second argument should be 0.

Notes: A POSIX compliant system typically should not define NAME_MAX, since the value almost certainly varies across different file system types. Refer to POSIX 1003.1a, Section 2.9.5, Table 2-5.

Source File:
src/support.c

get_next_meta

Declaration:
  static char *get_next_meta(pool *p, cmd_rec *cmd, unsigned char **f)
Source File:
modules/mod_log.c

get_num_bytes

Declaration:
  static ssize_t get_num_bytes(char *nbytes_str)
Source File:
modules/mod_core.c

get_param_int

Declaration:
  long get_param_int(xaset_t *set, const char *name, int recurse)
Comments: This function returns the first argument in a
CONF_PARAM configuration record. If more than one, or all, arguments are needed, the caller will need to use find_config() instead, and iterate through the argv arguments itself. The recurse parameter should almost always be FALSE. Exceptions to this rule are very rare.

Returns -1 if the parameter name is not found. Note that parameters are not allowed to contain negative integers.

Source File: src/dirtree.c

get_param_int_next

Declaration:
  long get_param_int_next(const char *name, int recurse)
Comments: Similar to
get_param_int(), this function will retrieve the next matching parameter after a call to get_param_int().

Returns -1 if the parameter name is not found, or if this function was not preceded by a call to get_param_int().

Source File: src/dirtree.c

get_param_ptr

Declaration:
  void *get_param_ptr(xaset_t *set, const char *name, int recurse)
Comments: This function returns the first argument in a
CONF_PARAM configuration record. If more than one, or all, arguments are needed, the caller will need to use find_config() instead, and iterate through the argv arguments itself. The recurse parameter should almost always be FALSE. Exceptions to this rule are very rare.

Returns NULL if the parameter name is not found.

Source File: src/dirtree.c

get_param_ptr_next

Declaration:
  void *get_param_ptr_next(const char *name, int recurse)
Comments: Similar to
get_param_ptr(), this function will retrieve the next matching parameter after a call to get_param_ptr().

Returns NULL if the parameter name is not found, or if this function was not preceded by a call to get_param_ptr().

Source File: src/dirtree.c

get_token

Declaration:
  char *get_token(char **s, char *sep)
Comments: This function tokenizes the string s, incrementing the pointer to s to the next non-separator sep in the string, and returning a token. If the source string s is empty or NULL, the next token returned will be NULL.

Source File:
src/support.c

get_word

Declaration:
  char *get_word(char **cp)
Comments: Retrieve an individual word, space-delimited, from the given string cp, respecting quotes and escapes. The cp pointer is advanced as the word is consumed from the string.

Source File:
src/dirtree.c

handle_alarm

Declaration:
  void handle_alarm(void)
Source File:
src/timers.c

ident_timeout_cb

Declaration:
  static int ident_timeout_cb(CALLBACK_FRAME)
Comments: Timer callback function which aborts an ident (RFC 1413) lookup. The timer length is set to 10 seconds, and is tunable via the PR_TUNABLE_TIMEOUTIDENT macro, defined in
include/options.h.

Source File: src/ident.c

idle_timeout_cb

Declaration:
  static int idle_timeout_cb(CALLBACK_FRAME)
Comments: Timer callback function which disconnects an idle session. The timer length is configurable via the TimeoutIdle configuration directive.

Source File:
src/main.c

inet_accept

Declaration:
  conn_t *inet_accept(pool *pool, conn_t *d, conn_t *c, int rfd, int wfd, int resolve)
Comments: Accepts a new connection, cloning the existing conn_t and returning it, or NULL upon error.

Source File:
src/inet.c

inet_accept_nowait

Declaration:
  int inet_accept_nowait(pool *pool, conn_t *c)
Comments: Accepts a new connection, return immediately with -1 if no connection is available. If a connection is accepted, creating a new conn_t and potential resolving is deferred, and a normal socket fd is returned for the new connection, which can later be used in inet_openrw to fully open and resolve addresses.

Source File:
src/inet.c

inet_ascii

Declaration:
  char *inet_ascii(pool *pool, p_in_addr_t *addr)
Comments: Wrapper function for inet_ntoa, except it stores the result in memory allocated from pool.

Source File:
src/inet.c

inet_associate

Declaration:
  conn_t *inet_associate(pool *pool, conn_t *c, p_in_addr_t *addr, IOFILE *inf,
    IOFILE *outf, int resolve)
Comments: Associate the already open streams with a connection, returning NULL if either stream points to a non-socket descriptor. If addr is non-NULL, remote address discovery is attempted. If resolve is non-zero, the remote address is reverse solved.

Source File:
src/inet.c

inet_close

Declaration:
  void inet_close(pool *pool, conn_t *c)
Comments: With this function, it is not necessary to close file descriptors or schedule IOFILEs for removal because the creator of the connection, either
inet_create_connection() or inet_copy_connection() will have registered a pool cleanup handler (conn_cleanup_cb()) which will do all of this work for us. Simply destroy the connection c's pool, and it will do the rest. The given pool is not used by this function.

Source File: src/inet.c

inet_connect

Declaration:
  int inet_connect(pool *pool, conn_t *c, p_in_addr_t *addr, int port)
Source File:
src/inet.c

inet_connect_nowait

Declaration:
  int inet_connect_nowait(pool *pool, conn_t *c, p_in_addr_t *addr, int port)
Comments: Attempt to connect a connection, returning immediately with 1 if connected, 0 if not connected, or -1 if error. This only needs to be called once, and can then be selected for writing.

Source File:
src/inet.c

inet_copy_connection

Declaration:
  conn_t *inet_copy_connection(pool *p, conn_t *c)
Comments: Copy a connection structure, also creating a subpool for the new connection.

Source File:
src/inet.c

inet_create_connection

Declaration:
  conn_t *inet_create_connection(pool *p, xaset_t *servers, int fd, p_in_addr_t *bind_addr,
    int port, int retry_bind)
Source File:
src/inet.c

inet_create_connection_portrange

Declaration:
  conn_t *inet_create_connection_portrange(pool *p, xaset_t *servers, p_in_addr_t *bind_addr,
    int low_port, int high_port)
Source File:
src/inet.c

inet_fqdn

Declaration:
  char *inet_fqdn(pool *pool, const char *addr)
Comments: Returns the FQDN (Fully Qualified Domain Name) of an address.

Source File:
src/inet.c

inet_get_conn_info

Declaration:
  int inet_get_conn_info(conn_t *c, int fd)
Comments: Using the socket descriptor fd, retrieve the local and remote IP addresses and ports in use, and store them in c's fields.

Source File:
src/inet.c

inet_getaddr

Declaration:
  p_in_addr_t *inet_getaddr(pool *pool, char *name)
Comments: DNS/hosts lookup for a particular name.

Source File:
src/inet.c

inet_gethostname

Declaration:
   char *inet_gethostname(pool *pool)
Comments: Return the hostname (wrapper for gethostname(2), except that it returns the FQDN).

Source File:
src/inet.c

inet_getname

Declaration:
  char *inet_getname(pool *pool, p_in_addr_t *addr)
Comments: Given an IP address, return the FQDN.

Source File:
src/inet.c

inet_getservport

Declaration:
  int inet_getservport(pool *pool, char *serv, char *proto)
Comments: Find a service, and return its port number (in network byte order).

Source File:
src/inet.c

inet_initialize_connection

Declaration:
  static conn_t *inet_initialize_connection(pool *p, xaset_t *servers, int fd, p_in_addr_t *bind_addr,
    int port, int retry_bind, int reporting)
Comments: Initialize a new connection record, also creating a new subpool just for the new connection.

Source File:
src/inet.c

inet_listen

Declaration:
  int inet_listen(pool *pool, conn_t *c, int backlog)
Comments: Puts a connection in listening mode.

Source File:
src/inet.c

inet_openrw

Declaration:
  conn_t *inet_openrw(pool *pool, conn_t *c, p_in_addr_t *addr, int fd, int rfd,
    int wfd, int resolve)
Comments: Open streams for a new socket; if rfd and wfd != -1, two new fds are dup()ed to the respective read/write fds. If the fds specified correspond to the normal stdin and stdout, the streams opened will be assigned to stdin and stdout in an intuitive fashion (so that they may be later used by printf()/fgets() type libc functions). If addr is non-NULL, the address is assigned to the connection (as the source of the connection). If it is NULL, remote address discovery will be attempted. The connection structure's appropriate fields are filled in, including the destination address. Finally, if resolve is non-zero, inet_openrw() will attempt to reverse resolve the remote address. A new connection structure is created from pool.

Source File:
src/inet.c

_inet_pool_cleanup

Declaration:
  static void inet_pool_cleanup_cb(void *ignore)
Source File:
src/inet.c

inet_resetlisten

Declaration:
  int inet_resetlisten(pool *pool, conn_t *c)
Comments: Reset a connection back to listening mode. Enables blocking mode for safety.

Source File:
src/inet.c

inet_resolve_ip

Declaration:
  void inet_resolve_ip(pool *pool, conn_t *c)
Comments: Performs reverse IP resolution via DNS on an existing connection.

Source File:
src/inet.c

inet_reverse_dns

Declaration:
  int inet_reverse_dns(pool *pool, int enable)
Comments: Enable or disable reverse DNS lookups.

Source File:
src/inet.c

inet_set_proto_options

Declaration:
  int inet_set_proto_options(pool *pool, conn_t *c, int nodelay, int lowdelay, int throughput,
    int nopush)
Comments: Sets the following protocol-level options (if supported by the OS) on the given connection c: TCP_NODELAY, IP_TOS (for low delay and throughput options), and TCP_NOPUSH.

Source File:
src/inet.c

inet_setasync

Declaration:
  int inet_setasync(pool *pool, conn_t *c)
Comments: Puts a socket in asynchronous mode, so that SIGURG is raised on OOB data.

Source File:
src/inet.c

inet_setblock

Comments: Puts a socket in blocking mode.

Declaration:
  int inet_setblock(pool *pool, conn_t *c)
Source File:
src/inet.c

inet_setnonblock

Declaration:
  int inet_setnonblock(pool *pool, conn_t *c)
Comments: Puts a socket in non-blocking mode.

Source File:
src/inet.c

inet_setoptions

Declaration:
  int inet_setoptions(pool *pool, conn_t *c, int rcvbuf, int sndbuf)
Comments: Set socket-level options on a connection. If file descriptor sets of c are -1, the socket snd/rcv buffers will be set according to the server configuration.

Source File:
src/inet.c

inet_validate

Declaration:
  char *inet_validate(char *buf)
Comments: Validate anything returned from the outside, since it's untrusted information.

Source File:
src/utils.c

inetd_main

Declaration:
  static void inetd_main(void)
Source File:
src/main.c

init_child_modules

Declaration:
  int init_child_modules(void)
Comments: Called after forking in order to inform and initialize any modules that need to know that a child connection has been spawned.

Source File:
src/modules.c

init_conf_stacks

Declaration:
  void init_conf_stacks(void)
Source File:
src/dirtree.c

init_config

Declaration:
  void init_config(void)
Source File:
src/dirtree.c

init_dyn_stacks

Declaration:
  void init_dyn_stacks(pool *p, config_rec *top)
Source File:
src/dirtree.c

init_fs

Declaration:
  int init_fs(void)
Source File:
src/fs.c

init_inet

Declaration:
  void init_inet(void)
Source File:
src/inet.c

init_log

Declaration:
  void init_log(void)
Source File:
src/log.c

init_modules

Declaration:
  int init_modules(void)
Comments: Called only during server startup, before the configuration file is parsed, in order to allow all registered modules time to initialize and prepare themselves for file parsing and session handling.

Source File:
src/modules.c

init_set_proc_title

Declaration:
  static void init_set_proc_title(int argc, char *argv[], char *envp[])
Source File:
src/main.c

install_signal_handlers

Declaration:
  static void install_signal_handlers(void)
Comments: The subpool for the child list is created the first time the server forks off a child. To conserve memory, the pool and list are destroyed when the last child dies, to prevent the list from eating more and more memory on long uptimes.

Source File:
src/main.c

is_dotdir

Declaration:
  static int is_dotdir(char *s)
Comments: Returns TRUE if the given path s is ".", "./", "../", or "..", FALSE otherwise.

Source File:
modules/mod_ls.c

isnumeric

Declaration:
  static int isnumeric(char *str)
Source File:
src/ftpshut.c

kludge_disable_umask

Declaration:
  void kludge_disable_umask(void)
Source File:
src/dirtree.c

kludge_enable_umask

Declaration:
  void kludge_enable_umask(void)
Source File:
src/dirtree.c

list_modules

Declaration:
  void list_modules(void)
Comments: This function simply prints out the list of modules compiled into the server at configure-time.

Source File:
src/modules.c

listdir

Declaration:
  static int listdir(cmd_rec *cmd, pool *workp, const char *name)
Source File:
modules/mod_ls.c

listen_binding

Declaration:
  int listen_binding(fd_set *rfd)
Source File:
src/main.c

listfile

Declaration:
  int listfile(cmd_rec *cmd, pool *p, const char *name)
Source File:
modules/mod_ls.c

lockdown

Declaration:
  static int lockdown(char *newroot)
Source File:
modules/mod_auth.c

log

Declaration:
  void log(int priority, int f, char *s)
Source File:
src/log.c

log_auth

Declaration:
  void log_auth(int priority, char *fmt, ...)
Comments: This function works much like
log_pri(), except that the log entry is sent to the LOG_AUTHPRIV facility, presumably because the log entry does not need to be seen by everyone.

Source File: src/log.c

log_auth_complete

Declaration:
  MODRET log_auth_complete(cmd_rec *cmd)
Source File:
modules/mod_log.c

log_close_xfer

Declaration:
  void log_close_xfer(void)
Source File:
src/log.c

log_closesyslog

Declaration:
  void log_closesyslog(void)
Source File:
src/log.c

log_command

Declaration:
  MODRET log_command(cmd_rec *cmd)
Source File:
modules/mod_log.c

log_debug

Declaration:
  void log_debug(int level, char *str, ...)
Comments: This function formats the given parameters using vnsnprintf() according to the given format str, then sends the message to
log() to be logged at the given debug level. level should be one the DEBUGn defines in include/log.h. If level is greater than the current debug level, the message is silently ignored.

Source File: src/log.c

log_discard

Declaration:
  void log_discard(void)
Source File:
src/log.c

log_init

Declaration:
  int log_init(void)
Source File:
modules/mod_log.c

log_open_xfer

Declaration:
  int log_open_xfer(const char *fn)
Source File:
src/log.c

log_openfile

Declaration:
  int log_openfile(const char *log_file, int *log_fd, mode_t log_mode)
Source File:
src/log.c

log_opensyslog

Declaration:
  int log_opensyslog(const char *fn)
Source File:
src/log.c

log_pri

Declaration:
  void log_pri(int priority, char *fmt, ...)
Comments: This function formats the given parameters using vnsnprintf() according to the given fmt, then sends the message to
log() to be logged at the given priority. priority should be one the PR_LOG_* log priorities defined in include/log.h.

Source File: src/log.c

log_rehash

Declaration:
  void log_rehash(void *d)
Source File:
modules/mod_log.c

log_sess_init

Declaration:
  static int log_sess_init(void)
Source File:
modules/mod_log.c

log_setdebuglevel

Declaration:
  int log_setdebuglevel(int level)
Comments: This sets the debugging log level, as per the DEBUGn defines in
include/log.h. The new debug level is set, and the previous debug level is returned.

Source File: src/log.c

log_setfacility

Declaration:
  void log_setfacility(int facility)
Source File:
src/log.c

log_stderr

Declaration:
  void log_stderr(int bool)
Comments: This function disables logging to stderr, based on the given bool parameter, and should be called right before fork()ing or dissociation from the controllling terminal. After disabling stderr, all messages will be sent to syslog.

Source File:
src/log.c

log_wtmp

Declaration:
  int log_wtmp(char *line, char *name, char *host, p_in_addr_t *ip)
Comments: This functions logs an entry to wtmp/wtmpx, and must be called as root before a chroot() occurs.

Notes: This function has some portability #ifdefs in it which should work, but haven't really been tested.

Source File:
src/log.c

log_xfer

Declaration:
  int log_xfer(int xfertime, char *remhost, unsigned long fsize, char *fname, char xfertype,
    char direction, char access, char *user, char abort_flag)
Source File:
src/log.c

logformat

Declaration:
  void logformat(char *nickname, char *fmts)
Source File:
modules/mod_log.c

login_check_limits

Declaration:
  int login_check_limits(xaset_t *conf, int recurse, int and, int *found)
Comments:

Notes: If and == 1, the log is short-circuited so that the first failure results in a FALSE return value from the entire function; if and == 0, an ORing operation is assumed, and the function will return TRUE if any <Limit LOGIN> allows access.

Source File:
src/dirtree.c

ls_done

Declaration:
  void ls_done(cmd_rec *cmd)
Source File:
modules/mod_ls.c

ls_err_nlst

Declaration:
  MODRET ls_err_nlst(cmd_rec *cmd)
Source File:
modules/mod_ls.c

ls_list

Declaration:
  MODRET ls_list(cmd_rec *cmd)
Comments: Command handler for the LIST FTP command.

Source File:
modules/mod_ls.c

ls_log_nlst

Declaration:
  MODRET ls_log_nlst(cmd_rec *cmd)
Source File:
modules/mod_ls.c

ls_nlst

Declaration:
 MODRET ls_nlst(cmd_rec *cmd)
Comments: Command handler for the NLST FTP command.

Source File:
modules/mod_ls.c

ls_perms

Declaration:
  static int ls_perms(pool *p, cmd_rec *cmd, const char *path, int *hidden)
Source File:
modules/mod_ls.c

ls_perms_full

Declaration:
  static int ls_perms_full(pool *p, cmd_rec *cmd, const char *path, int *hidden)
Source File:
modules/mod_ls.c

ls_post_pass

Declaration:
  MODRET ls_post_pass(cmd_rec *cmd)
Source File:
modules/mod_ls.c

ls_stat

Declaration:
  MODRET ls_stat(cmd_rec *cmd)
Comments: Command handler for the STAT FTP command.

Source File:
modules/mod_ls.c

ls_terminate

Declaration:
  void ls_terminate(void)
Source File:
modules/mod_ls.c

main_exit

Declaration:
  void main_exit(void *pv, void *lv, void *ev, void *dummy)
Source File:
src/main.c

main_set_idle

Declaration:
  void main_set_idle(void)
Source File:
src/main.c

make_arg_str

Declaration:
  char *make_arg_str(pool *p, int argc, char **argv)
Source File:
src/support.c

make_array

Declaration:
  array_header *make_array(pool *p, int nelts, int elt_size)
Comments: This function allocates an
array_header from the given pool p, initializing it to have nelts number of elements, each of elt_size size. If nelts is less than 1, it will automatically be set to 1, so that the array_header has at least one allocated slot.

Source File: src/pool.c

make_ftp_cmd

Declaration:
  static cmd_rec *make_ftp_cmd(pool *p, char *buf)
Source File:
src/main.c

make_sub_pool

Declaration:
  struct pool *make_sub_pool(struct pool *p)
Source File:
src/pool.c

malloc_block

Declaration:
  union block_hdr *malloc_block(int size)
Source File:
src/pool.c

mask_signals

Declaration:
  static void mask_signals(unsigned char block)
Source File:
src/support.c

match_ip

Declaration:
  int match_ip(p_in_addr_t *addr, char *name, const char *match)
Comments: Returns 1 if it is an explicit match; -1 if it is an explicit mismatch (i.e. "NONE"); 0 if there is no match.

Notes: this explanation is incomplete.

Source File:
src/dirtree.c

modpam_exit

Declaration:
  static void modpam_exit(void)
Source File:
modules/mod_auth_pam.c

mod_create_data

Declaration:
  modret_t *mod_create_data(cmd_rec *cmd, void *d)
Source File:
src/modules.c

mod_create_error

Declaration:
  modret_t *mod_create_error(cmd_rec *cmd, int mr_errno)
Source File:
src/modules.c

mod_create_ret

Declaration:
  modret_t *mod_create_ret(cmd_rec *cmderr, char *n, char *m)
Source File:
src/modules.c

mod_privdata_alloc

Declaration:
  privdata_t *mod_privdata_alloc(cmd_rec *cmd, char *tag, int size)
Source File:
src/modules.c

mod_privdata_find

Declaration:
  privdata_t *mod_privdata_find(cmd_rec *cmd, char *tag, module *m)
Source File:
src/modules.c

module_exists

Declaration:
  int module_exists(const char *name)
Source File:
src/modules.c

netio_buffer_alloc

Declaration:
  static pr_netio_buffer_t *netio_buffer_alloc(pr_netio_stream_t *nstrm)
Comments: Create a new pr_netio_buffer_t from nstrm's pool, and assign it to nstrm.

Source File:
src/netio.c

new_block

Declaration:
  union block_hdr *new_block(int min_size)
Source File:
src/pool.c

nlstdir

Declaration:
  static int nlstdir(cmd_rec *cmd, const char *dir)
Source File:
modules/mod_ls.c

nlstfile

Declaration:
  int nlstfile(cmd_rec *cmd, const char *file)
Source File:
modules/mod_ls.c

noxfer_timeout_cb

Declaration:
  static int noxfer_timeout_cb(CALLBACK_FRAME)
Source File:
modules/mod_xfer.c

null_alloc

Declaration:
  static void *null_alloc(size_t size)
Source File:
src/pool.c

outputfiles

Declaration:
  int outputfiles(cmd_rec *cmd)
Source File:
modules/mod_ls.c

p_endgrent

Declaration:
  static void p_endgrent(void)
Source File:
modules/mod_auth_unix.c

p_endpwent

Declaration:
  static void p_endpwent(void)
Source File:
modules/mod_auth_unix.c

p_getgrent

Declaration:
  static struct group *p_getgrent(void)
Source File:
modules/mod_auth_unix.c

p_getgrgid

Declaration:
  static struct group *p_getgrgid(gid_t gid)
Source File:
modules/mod_auth_unix.c

p_getgrnam

Declaration:
  static struct group *p_getgrnam(const char *name)
Source File:
modules/mod_auth_unix.c

p_getpwent

Declaration:
  static struct passwd *p_getpwent(void)
Source File:
modules/mod_auth_unix.c

p_getpwnam

Declaration:
  static struct passwd *p_getpwnam(const char *name)
Source File:
modules/mod_auth_unix.c

p_getpwuid

Declaration:
  static struct passwd *p_getpwuid(uid_t uid)
Source File:
modules/mod_auth_unix.c

p_setgrent

Declaration:
  static void p_setgrent(void)
Source File:
modules/mod_auth_unix.c

p_setpwent

Declaration:
  static void p_setpwent(void)
Source File:
modules/mod_auth_unix.c

palloc

Declaration:
  void *palloc(struct pool *p, int reqsize)
Source File:
src/pool.c

pam_auth

Declaration:
  MODRET pam_auth(cmd_rec *cmd)
Source File:
modules/mod_auth_pam.c

pam_exchange

Declaration:
  static int pam_exchange(int num_msg, struct pam_message **msg, struct pam_response **resp,
    void *appdata_ptr)
Source File:
modules/mod_auth_pam.c

parse_config_file

Declaration:
  int parse_config_file(const char *fname)
Source File:
src/dirtree.c

passwd_dup

Declaration:
  static struct passwd *passwd_dup(pool *p, struct passwd *pw)
Source File:
modules/mod_auth.c

pcalloc

Declaration:
  void *pcalloc(struct pool *p, int size)
Source File:
src/pool.c

pclosef

Declaration:
  int pclosef(pool *p, int fd)
Comments:

See Also:
popenf()

Source File: src/pool.c

pdircat

Declaration:
  char *pdircat(pool *p, ...)
Comments: Using the given pool p for memory, this function will concatenate the given char * arguments into a string, each element separated by a directory separator character (e.g. /), to create a path.

Notes: The argument list must end with a NULL. You have been warned.

See Also:
pstrcat()

Source File: src/pool.c

pfclose

Declaration:
  int pfclose(pool *p, FILE *fp)
Source File:
src/pool.c

pfdopen

Declaration:
  FILE *pfdopen(pool *p, int fd, const char *mode)
Source File:
src/pool.c

pfopen

Declaration:
  FILE *pfopen(pool *p, const char *name, const char *mode)
Source File:
src/pool.c

pool_release_free_block_list

Declaration:
  void pool_release_free_block_list(void)
Source File:
src/pool.c

pop_cwd

Declaration:
  static void pop_cwd(char *_cwd, int *symhold)
Source File:
modules/mod_ls.c

popenf

Declaration:
  int popenf(pool *p, const char *name, int flg, int mode)
Source File:
src/pool.c

preparse_arg

Declaration:
  char *preparse_arg(char **s)
Source File:
modules/mod_log.c

pr_alarms_block

Declaration:
  void pr_alarms_block(void)
Comments: Blocks timers (which operate based on SIGALRM) from being run.

Source File:
src/timers.c

pr_alarms_unblock

Declaration:
  void pr_alarms_unblock(void)
Source File:
src/timers.c

pr_alloc_netio

Declaration:
  pr_netio_t *pr_alloc_netio(pool *parent_pool)
Comments: Create a new pr_netio_t object, allocating a subpool from parent_pool for the new object.

Source File:
src/netio.c

pr_class_and_expression

Declaration:
  unsigned char pr_class_and_expression(char **expr)
Source File:
src/dirtree.c

pr_class_or_expression

Declaration:
  unsigned char pr_class_or_expression(char **expr)
Source File:
src/dirtree.c

pr_exit_register_handler

Declaration:
  void pr_exit_register_handler(void (*f)())
Comments: Register a function f to be run when the server exits normally, and the
run_exit_handlers() function is called, which happens in end_login_noexit().

Source File: src/support.c

pr_fs_clean_path

Declaration:
  void pr_fs_clean_path(const char *path, char *buf, int maxlen)
Source File:
src/fsio.c

pr_fs_clear_cache

Declaration:
  void pr_fs_clear_cache(void)
Source File:
src/fsio.c

pr_fs_dircat

Declaration:
  void pr_fs_dircat(char *buf, int len, const char *dir1, const char *dir2)
Comments: Concatenates dir1 and dir2, and places the results in buf, where len indicates the size of buf. If the concatenated path would be longer than MAXPATHLEN, then buf will default to "/".

Notes: This function uses strdup() and free(), rather than pools, for memory, thus breaking the general rule of using pools. This is done intentionally in this function for performance reasons, as this function is highly utilized.

Source File:
src/fsio.c

pr_fs_getcwd

Declaration:
  const char *pr_fs_getcwd(void)
Source File:
src/fsio.c


pr_fs_getsize

Declaration:
  off_t pr_fs_getsize(char *path)
Source File:
src/fsio.c

pr_fs_getvwd

Declaration:
  const char *pr_fs_getvwd(void)
Source File:
src/fsio.c

pr_fs_glob

Declaration:
  int pr_fs_glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
Comments: pr_fs_glob is just a wrapper for glob, setting the various gl_ callbacks to our FSIO functions.

Source File:
src/fsio.c

pr_fs_globfree

Declaration:
  void pr_fs_globfree(glob_t *pglob)
Source File:
src/fsio.c

pr_fs_interpolate

Declaration:
  int pr_fs_interpolate(const char *path, char *buf, int maxlen)
Comments: This function performs any tilde expansion needed, then returns the resolved path, if any.

Source File:
src/fsio.c

pr_fs_resolve_partial

Declaration:
  int pr_fs_resolve_partial(const char *path, char *buf, int maxlen, int op)
Source File:
src/fsio.c

pr_fs_resolve_path

Declaration:
  int pr_fs_resolve_path(const char *path, char *buf, int maxlen, int op)
Source File:
src/fsio.c

pr_fs_setcwd

Declaration:
  void pr_fs_setcwd(const char *dir)
Source File:
src/fsio.c

pr_fs_virtual_path

Declaration:
  void pr_fs_virtual_path(const char *path, char *buf, int maxlen)
Source File:
src/fsio.c

pr_fsio_chdir

Declaration:
  int pr_fsio_chdir(const char *path, int hidesymlink)
Source File:
src/fsio.c

pr_fsio_chdir_canon

Declaration:
  int pr_fsio_chdir_canon(const char *path, int hidesymlink)
Source File:
src/fsio.c

pr_fsio_chmod

Declaration:
  int pr_fsio_chmod(const char *name, mode_t mode)
Source File:
src/fsio.c

pr_fsio_chmod_canon

Declaration:
  int pr_fsio_chmod_canon(const char *name, mode_t mode)
Source File:
src/fsio.c

pr_fsio_chown

Declaration:
  int pr_fsio_chown(const char *name, uid_t uid, gid_t gid)
Source File:
src/fsio.c

pr_fsio_chown_canon

Declaration:
  int pr_fsio_chown_canon(const char *name, uid_t uid, gid_t gid)
Source File:
src/fsio.c

pr_fsio_chroot

Declaration:
  int pr_fsio_chroot(const char *path)
Source File:
src/fsio.c

pr_fsio_close

Declaration:
  int pr_fsio_close(pr_fh_t *fh, int fd)
Source File:
src/fsio.c

pr_fsio_closedir

Declaration:
  int pr_fsio_closedir(void *d)
Source File:
src/fsio.c

pr_fsio_creat

Declaration:
  pr_fh_t *pr_fsio_creat(const char *name, mode_t mode, int *fd)
Source File:
src/fsio.c

pr_fsio_creat_canon

Declaration:
  pr_fh_t *pr_fsio_creat_canon(const char *name, mode_t mode, int *fd)
Source File:
src/fsio.c

pr_fsio_getline

Declaration:
  char *pr_fsio_getline(char *buf, int buflen, pr_fh_t *fh, unsigned int *lineno)

Comments: This function is an fgets(3) with backslash-newline line continuation handling. The extra lineno argument is needed, at the moment, to properly track which line of the file is being read in, so that errors can be reported with the correct line numbers.

Source File:
src/fsio.c

pr_fsio_gets

Declaration:
  char *pr_fsio_gets(char *buf, size_t size, pr_fh_t *fh, int fd)

Source File:
src/fsio.c

pr_fsio_link

Declaration:
  int pr_fsio_link(const char *lfrom, const char *lto)
Source File:
src/fsio.c

pr_fsio_link_canon

Declaration:
  int pr_fsio_link_canon(const char *lfrom, const char *lto)
Source File:
src/fsio.c

pr_fsio_lseek

Declaration:
  off_t pr_fsio_lseek(pr_fh_t *fh, int fd, off_t offset, int whence)
Source File:
src/fsio.c

pr_fsio_lstat

Declaration:
  int pr_fsio_lstat(const char *path, struct stat *sbuf)
Source File:
src/fsio.c

pr_fsio_lstat_canon

Declaration:
  int pr_fsio_lstat_canon(const char *path, struct stat *sbuf)
Source File:
src/fsio.c

pr_fsio_mkdir

Declaration:
  int pr_fsio_mkdir(const char *path, mode_t mode)
Source File:
src/fsio.c

pr_fsio_open

Declaration:
  pr_fh_t *pr_fsio_open(const char *name, int flags)
Source File:
src/fsio.c

pr_fsio_open_canon

Declaration:
  pr_fh_t *pr_fsio_open_canon(const char *name, int flags)
Source File:
src/fsio.c

pr_fsio_opendir

Declaration:
  void *pr_fsio_opendir(const char *path)
Source File:
src/fsio.c

pr_fsio_puts

Declaration:
  int pr_fsio_puts(const char *buf, pr_fh_t *fh)
Source File:
src/fsio.c

pr_fsio_read

Declaration:
  int pr_fsio_read(pr_fh_t *fh, int fd, char *buf, size_t size)
Source File:
src/fsio.c

pr_fsio_readdir

Declaration:
  struct dirent *pr_fsio_readdir(void *d)
Source File:
src/fsio.c

pr_fsio_readlink

Declaration:
  int pr_fsio_readlink(const char *path, char *buf, int maxlen)
Source File:
src/fsio.c

pr_fsio_readlink_canon

Declaration:
  int pr_fsio_readlink_canon(const char *path, char *buf, int maxlen)
Source File:
src/fsio.c

pr_fsio_rename

Declaration:
  int pr_fsio_rename(const char *rfrom, const char *rto)
Source File:
src/fsio.c

pr_fsio_rename_canon

Declaration:
  int pr_fsio_rename_canon(const char *rfrom, const char *rto)
Source File:
src/fsio.c

pr_fsio_rmdir

Declaration:
  int pr_fsio_rmdir(const char *path)
Source File:
src/fsio.c

pr_fsio_stat

Declaration:
  int pr_fsio_stat(const char *path, struct stat *sbuf)
Source File:
src/fsio.c

pr_fsio_stat_canon

Declaration:
  int pr_fsio_stat_canon(const char *path, struct stat *sbuf)
Source File:
src/fsio.c

pr_fsio_symlink

Declaration:
  int pr_fsio_symlink(const char *lfrom, const char *lto)
Source File:
src/fsio.c

pr_fsio_symlink_canon

Declaration:
  int pr_fsio_symlink_canon(const char *lfrom, const char *lto)
Source File:
src/fsio.c

pr_fsio_truncate

Declaration:
  int pr_fsio_truncate(const char *path, off_t len)
Source File:
src/fsio.c

pr_fsio_truncate_canon

Declaration:
  int pr_fsio_truncate_canon(const char *path, off_t len)
Source File:
src/fsio.c

pr_fsio_unlink

Declaration:
  int pr_fsio_unlink(const char *name)
Source File:
src/fsio.c

pr_fsio_unlink_canon

Declaration:
  int pr_fsio_unlink_canon(const char *name)
Source File:
src/fsio.c

pr_fsio_write

Declaration:
  int pr_fsio_write(pr_fh_t *fh, int fd, const char *buf, size_t size)
Source File:
src/fsio.c

pr_group_and_expression

Declaration:
  unsigned char pr_group_and_expression(char **expr)
Comments: Evaluates the given expression expr as a group AND expression, which means that all group memberships must be valid for the expression to be true. Returns TRUE if the current connected user matches the group expression, FALSE otherwise.

Bugs: This function assumes use of session.groups. Better would be to evaluate expr against a caller-provided array of group names.

Source File:
src/dirtree.c

pr_group_or_expression

Declaration:
  unsigned char pr_group_or_expression(char **expr)
Source File:
src/dirtree.c

pr_ident_lookup

Declaration:
  char *pr_ident_lookup(pool *p, conn_t *c)
Comments: Returns the identity of the remote user, as determined by the RFC 1413 ident protocol. Returns "UNKNOWN" if the lookup timeouts or fails.

Source File:
src/ident.c

pr_init_netio

Declaration:
  void pr_init_netio(void)
Source File:
src/netio.c

pr_init_pools

Declaration:
  void pr_init_pools(void)
Comments: Initialize the pool system by creating the base permanent_pool.

Source File:
src/pool.c

pr_netio_abort

Declaration:
  void pr_netio_abort(pr_netio_stream_t *nstrm)
Comments: This function sets the
PR_NETIO_ABORT flag on the given pr_netio_stream_t nstrm.

Source File: src/netio.c

pr_netio_close

Declaration:
  int pr_netio_close(pr_netio_stream_t *nstrm)
Comments: Close nstrm's file descriptor, and destroy nstrm.

Source File:
src/netio.c

pr_netio_gets

Declaration:
  char *pr_netio_gets(char *buf, size_t buflen, pr_netio_stream_t *nstrm)
Source File:
src/netio.c

pr_netio_lingering_close

Declaration:
  int pr_netio_lingering_close(pr_netio_stream_t *nstrm, long linger)

Source File:
src/netio.c

pr_netio_open

Declaration:
  pr_netio_stream_t *pr_netio_open(pool *parent_pool, int strm_type, int fd, int mode)
Comments: Create a new pr_netio_stream_t from parent_pool, and assign to it the file descriptor fd and mode mode. The mode argument must either PR_NETIO_IO_RD for reading or PR_NETIO_IO_WR for writing.

Source File:
src/netio.c

pr_netio_poll

Declaration:
  int pr_netio_poll(pr_netio_stream_t *nstrm)
Comments: This function is needed instead of simply blocking read()/write() because there is a race condition if the syscall should be interrupted inside read(), or write(), but the signal is received before we actually hit the read() or write() call. select() alleviates this problem by timing out (configurable via
pr_netio_set_poll_interval()), restarting the syscall if PR_NETIO_SESS_INTR is not set, or returning if it is set and we are interrupted by a signal. If after the timeout PR_NETIO_SESS_ABORT is set (presumably by a signal handler) or PR_NETIO_SESS_INTR and errno == EINTR, this function returns 1. Otherwise, return 0 when data are available, -1 if there are other errors.

Source File: src/netio.c

pr_netio_postopen

Declaration:
  int pr_netio_postopen(pr_netio_stream_t *nstrm)

Source File:
src/netio.c

pr_netio_printf

Declaration:
  int pr_netio_printf(pr_netio_stream_t *nstrm, char *fmt, ...)
Source File:
src/netio.c

pr_netio_printf_async

Declaration:
  int pr_netio_printf_async(pr_netio_stream_t *nstrm, char *fmt, ...)
Comments: This function is for use inside of alarm handlers, where no
pr_netio_poll() blocking is allowed. This is necessary because otherwise pr_netio_poll() can potentially hang forever if the send queue is full and the socket has been closed.

Source File: src/netio.c

pr_netio_read

Declaration:
  int pr_netio_read(pr_netio_stream_t *nstrm, char *buf, size_t buflen, int bufmin)
Source File:
src/netio.c

pr_netio_reopen

Declaration:
  pr_netio_stream_t *pr_netio_reopen(pr_netio_stream_t *nstrm, int fd, int mode)
Comments: Close nstrm's current file descriptor, and assign to nstrm the new file descriptor fd and mode mode. The mode argument must be either PR_NETIO_IO_RD for reading or PR_NETIO_IO_WR for writing.

Source File:
src/netio.c

pr_netio_set_poll_interval

Declaration:
  void pr_netio_set_poll_interval(pr_netio_stream_t *nstrm, unsigned int secs)
Comments: Sets the
PR_NETIO_SESS_INTR flag for nstrm, and configures the select() timeout used in pr_netio_poll() to secs.

Source File: src/netio.c

pr_netio_shutdown

Declaration:
  int pr_netio_shutdown(pr_netio_stream_t *nstrm, int how)
Source File:
src/netio.c

pr_netio_telnet_gets

Declaration:
  char *pr_netio_telnet_gets(char *buf, size_t buflen, pr_netio_stream_t *in_nstrm,
      pr_netio_stream_t *out_nstrm)
Comments: This function is exactly like
pr_netio_gets(), except that a few special telnet characters are handled, which takes care of the [IAC]ABOR command, and odd clients.

Source File: src/netio.c

pr_netio_write

Declaration:
  int pr_netio_write(pr_netio_stream_t *nstrm, char *buf, size_t buflen)
Source File:
src/netio.c

pr_netio_write_async

Declaration:
  int pr_netio_write_async(pr_netio_stream_t *nstrm, char *buf, size_t buflen)
Comments: This is a bit odd, because pr_netio_* functions are opaque, and we cannot be sure that we are dealing with a conn_t or that it is in O_NONBLOCK mode. Trying to do this without O_NONBLOCK would cause the kernel itself to block here, and thus invalidate the whole principle. Instead, we save the flags and put the file descriptor in O_NONBLOCK mode.

This function returns -1 if an error occurred, and errno is set appropriately. If everything goes smoothly, the number of bytes written is returned.

Source File:
src/netio.c

pr_parse_expression

Declaration:
  array_header *pr_parse_expression(pool *p, int *argc, char **argv)
Source File:
src/dirtree.c

pr_regexp_alloc

Declaration:
  regex_t *pr_regexp_alloc(void)
Source File:
src/regexp.c

pr_regexp_free

Declaration:
  void pr_regexp_free(regex_t *regex)
Source File:
src/regexp.c

pr_register_fs

Declaration:
  pr_fs_t *pr_register_fs(pool *pool, const char *name, const char *path)
Source File:
src/fsio.c

pr_register_fs_match

Declaration:
  pr_fs_match_t *pr_register_fs_match(pool *pool, sont char *name, const char *pattern, int opmask)
Source File:
src/fsio.c

pr_rehash_register_handler

Declaration:
  void pr_rehash_register_handler(void *data, void (*fp)(void *))
Comments: Registers a function fp to be run when the server receives a SIGHUP, which causes it to "rehash" the configuration file. The function fp will be called before the configuration file is rehashed, and will be passed the given data pointer.

Source File:
src/main.c

pr_response_add

Declaration:
  void pr_response_add(const char *numeric, const char *fmt, ...)
Comments: Add the given numeric and formatted message to the end of the success response chain, to be sent to the client if the FTP command completes successfully.

Source File:
src/response.c

pr_response_add_err

Declaration:
  void pr_response_add_err(const char *numeric, const char *fmt, ...)
Comments: Add the given numeric and formatted message to the error response chain, to be sent to the client if the FTP command processing results in an error.

Source File:
src/response.c

pr_response_flush

Declaration:
  void pr_response_flush(pr_response_t **head)
Comments: Flushes the response chain head out to the connected client.

Source File:
src/response.c

pr_response_register_handler

Declaration:
  void pr_response_register_handler(char *(*handler_cb)(pool *, const char *, ...))

Source File:
src/response.c

pr_response_send

Declaration:
  void pr_response_send(const char *resp_numeric, const char *fmt, ...)
Comments: This function will immediately send the given message, accompanied by the specific numeric, to the connected client.

Source File:
src/response.c

pr_response_send_async

Declaration:
  void pr_response_send_async(const char *resp_numeric, const char *fmt, ...)
Comments: This function will send an asynchronous message to the client, with the given numeric; it is suitable for use inside of signal handlers.

Source File:
src/response.c

pr_response_send_ml

Declaration:
  void pr_response_send_ml(const char *fmt, ...)
Comments: This function continues a previous multiline response, using the specified numeric, started by a
pr_response_send_ml_start() call.

Source File: src/response.c

pr_response_send_ml_end

Declaration:
  void pr_response_send_ml_end(const char *fmt, ...)
Comments: This function completes a multiline response.

Source File:
src/response.c

pr_response_send_ml_start

Declaration:
  void pr_response_send_ml_start(const char *resp_numeric, const char *fmt, ...)
Comments: This function begins a multiline FTP protocol response with the given numeric.

Source File:
src/response.c

pr_response_send_raw

Declaration:
  void pr_response_send_raw(const char *fmt, ...)
Source File:
src/response.c

pr_signals_block

Declaration:
  void pr_signals_block(void)
Source File:
src/support.c

pr_signals_handle

Declaration:
  void pr_signals_handle(void)
Source File:
src/main.c

pr_signals_unblock

Declaration:
  void pr_signals_unblock(void)
Source File:
src/support.c

pr_stash_add_symbol

Declaration:
  int pr_stash_add_symbol(pr_stash_type_t sym_type, void *data)
Comments: Inserts the given data of symbol type sym_type into the stash. This function returns the index at which data was inserted.

Source File:
src/modules.c

pr_stash_get_symbol

Declaration:
  void *pr_stash_get_symbol(pr_stash_type_t sym_type, const char *name, void *prev, int *idx_cache)
Source File:
src/modules.c

pr_stash_remove_symbol

Declaration:
  int pr_stash_remove_symbol(pr_stash_type_t sym_type, const char *sym_name, module *sym_module)
Source File:
src/modules.c

pr_user_and_expression

Declaration:
  unsigned char pr_user_and_expression(char **expr)
Comments: Evaluates the given expression expr as a user AND expression, which means that all user conditions must match for the current connected user for the expression to be true. Returns TRUE if the expression evaluates thus for the current user, FALSE otherwise.

Bugs: This function assumes use of session.user. Better would be to evaluate expr against a caller-provided user name.

Source File:
src/dirtree.c

pr_user_or_expression

Declaration:
  unsigned char pr_user_or_expression(char **expr)
Source File:
src/dirtree.c

pstrcat

Declaration:
  char *pstrcat(pool *p, ...)
Comments: Using the given pool p for memory, this function will concatenate the given char * arguments into a string.

Notes: The argument list must end with a NULL. You have been warned.

Source File:
src/pool.c

pstrdup

Declaration:
  char *pstrdup(struct pool *p, const char *s)
Comments: This function returns a pointer to a new string, NUL-terminated, which is a duplicate of the string s. Memory for the new string is obtained from the given pool p, and is freed when that pool is destroyed.

Source File:
src/pool.c

pstrndup

Declaration:
  char *pstrndup(struct pool *p, const char *s, int n)
Comments: Similar to pstrdup(), this function returns a pointer to a new string, NUL-terminated, which is a duplicate of the first n characters of the string s. Memory for the new string is obtained from the given pool p, and is freed when that pool is destroyed.

Source File:
src/pool.c

push_array

Declaration:
  void *push_array(array_header *arr)
Comments: This function returns a void pointer to a slot in the array_header arr into which a pointer to some element can be copied, in effect "pushing" that new element onto the array. array_headers will be grown as needed as more elements are pushed onto them. Pushed elements appear at the end of the array_header's list of elements, not the beginning.

Source File:
src/pool.c

push_cwd

Declaration:
  static void push_cwd(char *_cwd, int *symhold) {
Source File:
modules/mod_ls.c

pw_auth

Declaration:
  MODRET pw_auth(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_check

Declaration:
  MODRET pw_check(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_endgrent

Declaration:
  MODRET pw_endgrent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_endpwent

Declaration:
  MODRET pw_endpwent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getgrent

Declaration:
  MODRET pw_getgrent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getgrgid

Declaration:
  MODRET pw_getgrgid(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getgrnam

Declaration:
  MODRET pw_getgrnam(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getgroups

Declaration:
  MODRET pw_getgroups(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getpwent

Declaration:
  MODRET pw_getpwent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getpwnam

Declaration:
  MODRET pw_getpwnam(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_getpwuid

Declaration:
  MODRET pw_getpwuid(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_gid_name

Declaration:
 i MODRET pw_gid_name(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_name_gid

Declaration:
  MODRET pw_name_gid(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_name_uid

Declaration:
  MODRET pw_name_uid(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_setgrent

Declaration:
  MODRET pw_setgrent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_setpwent

Declaration:
  MODRET pw_setpwent(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

pw_uid_name

Declaration:
  MODRET pw_uid_name(cmd_rec *cmd)
Source File:
modules/mod_auth_unix.c

quote_dir

Declaration:
  static char *quote_dir(cmd_rec *cmd, char *dir)
Comments: As per RFC 959, directory responses for MKD and PWD should be "dir_name" (with quotes). For directory names that themselves contain quotes, the additional quotes must be duplicated.

Source File:
modules/mod_core.c

regex_filters

Declaration:
  MODRET regex_filters(cmd_rec *cmd)
Source File:
modules/mod_core.c

register_cleanup

Declaration:
  void register_cleanup(pool *p, void *data, void (*plain_cleanup)(void *),
    void (*child_cleanup)(void *))
Source File:
src/pool.c

register_fd_cleanups

Declaration:
  void register_fd_cleanups(pool *p, int fd)
Source File:
src/pool.c

register_file_cleanups

Declaration:
  void register_file_cleanups(pool *p, FILE *fp)
Source File:
src/pool.c

remove_config

Declaration:
  int remove_config(xaset_t *set, const char *name, int recurse)
Source File:
src/dirtree.c

remove_exit_handlers

Declaration:
  void remove_exit_handlers(void)
Source File:
src/support.c

remove_timer

Declaration:
  int remove_timer(int timerno, module *mod)
Comments: Removes an active timer from play. The timer must have the timerno given, and be registered by module mod. If found, the timerno is returned, otherwise 0 is returned. As a special case, the macro ANY_MODULE may be used for the mod argument, in which case a timer with the given timerno will be removed, regardless of the registering module.

Source File:
src/timers.c

reset_timer

Declaration:
  int reset_timer(int timerno, module *mod)
Comments: Resets the time on an active timer. The timer must have the timerno given, and be registered by module mod. If found, the timerno is returned, otherwise 0 is returned. As a special case, the macro ANY_MODULE may be used for the mod argument, in which case a timer with the given timerno will be removed, regardless of the registering module.

Source File:
src/timers.c

resolve_anonymous_dirs

Declaration:
  void resolve_anonymous_dirs(xaset_t *clist)
Comments: Iterate through <Directory> blocks inside of an <Anonymous> context, and resolve each one. This is usually done after a connection has been made to an <Anonymous> server.

Source File:
src/dirtree.c

resolve_defered_dirs

Declaration:
  void resolve_defered_dirs(server_rec *s)
Comments: Iterate through <Directory> configuration records and resolve ~ references. This function is usually called after a connection has been made to a server.

Source File:
src/dirtree.c

retr_abort

Declaration:
  static void retr_abort(void)
Source File:
modules/mod_xfer.c

retr_complete

Declaration:
  static void retr_complete(void)
Source File:
modules/mod_xfer.c

run_cleanups

Declaration:
  static void run_cleanups(struct cleanup *c)
Source File:
src/pool.c

run_exit_handlers

Declaration:
  void run_exit_handlers(void)
Source File:
src/support.c

run_schedule

Declaration:
  void run_schedule(void)
Source File:
src/support.c

safe_token

Declaration:
  char *safe_token(char **s)
Comments: This function tokenizes a string s, returning the next token in the string, and incrementing the s pointer to the next non-whitespace character in the string. It is "safe" because it never returns NULL, only an empty string if no token remains in the source string.

Source File:
src/support.c

schedule

Declaration:
  void schedule(void (*f)(void *, void *, void *, void *), int nloops, void *a1, void *a2,
    void *a3, void *a4)
Source File:
src/support.c

semaphore_fds

Declaration:
  static int semaphore_fds(fd_set *rfd, int max_fd)
Comments: Adds child semaphore fds into the rfd set for selection.

Source File:
src/main.c

sendline

Declaration:
  int sendline(char *fmt, ...)
Source File:
modules/mod_ls.c

serv_conn_cleanup_cb

Declaration:
  static void serv_conn_cleanup_cb(void *connp)
Source File:
src/main.c

set_accessdenymsg

Declaration:
  MODRET set_accessdenymsg(cmd_rec *cmd)
Comments: Configuration directive handler for the AccessDenyMsg directive.

Source File:
modules/mod_core.c

set_accessgrantmsg

Declaration:
  MODRET set_accessgrantmsg(cmd_rec *cmd)
Comments: Configuration directive handler for the AccessGrantMsg directive.

Source File:
modules/mod_core.c

set_allowall

Declaration:
  MODRET set_allowall(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowAll directive.

Source File:
modules/mod_core.c

set_allowfilter

Declaration:
  MODRET set_allowfilter(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowFilter directive.

Source File:
modules/mod_core.c

set_allowforeignaddress

Declaration:
  MODRET set_allowforeignaddress(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowForeignAddress directive.

Source File:
modules/mod_core.c

set_allowlogsymlinks

Declaration:
  MODRET set_allowlogsymlinks(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowLogSymlinks directive.

Source File:
modules/mod_log.c

set_allowoverride

Declaration:
  MODRET set_allowoverride(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowOverride directive.

Source File:
modules/mod_core.c

set_allowoverwrite

Declaration:
  MODRET set_allowoverwrite(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowOverwrite directive.

Source File:
modules/mod_xfer.c

set_allowretrieverestart

Declaration:
  MODRET set_allowretrieverestart(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowRetrieveRestart directive.

Source File:
modules/mod_core.c

set_allowstorerestart

Declaration:
  MODRET set_allowstorerestart(cmd_rec *cmd)
Comments: Configuration directive handler for the AllowStoreRestart directive.

Source File:
modules/mod_core.c

set_anonrequirepassword

Declaration:
  MODRET set_anonrequirepassword(cmd_rec *cmd)
Comments: Configuration directive handler for the AnonRequirePassword directive.

Source File:
modules/mod_core.c

set_auth_check

Declaration:
  void set_auth_check(int (*ck)(cmd_rec *))
Comments: Sets a function ck to be invoked in order to verify that a given FTP command in the form of a cmd_rec is authorized. Usually this function prevents FTP commands from being processed unless the client has successfully authenticated via USER/PASS commands. Specific FTP commands are subject to this authorization check via one of the cmdtable Boolean fields.

Source File:
src/main.c

set_authaliasonly

Declaration:
  MODRET set_authaliasonly(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthAliasOnly directive.

Source File:
modules/mod_core.c

set_authgroupfile

Declaration:
  MODRET set_authgroupfile(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthGroupFile directive.

Source File:
modules/mod_auth_unix.c

set_authpam

Declaration:
  MODRET set_authpam(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthPAM directive.

Source File:
modules/mod_auth_pam.c

set_authpamauthoritative

Declaration:
  MODRET set_authpamauthoritative(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthPAMAuthoritative directive.

Source File:
modules/mod_auth_pam.c

set_authpamconfig

Declaration:
  MODRET set_authpamconfig(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthPAMConfig directive.

Source File:
modules/mod_auth_pam.c

set_authuserfile

Declaration:
  MODRET set_authuserfile(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthUserFile directive.

Source File:
modules/mod_auth_unix.c

set_authusingalias

Declaration:
  MODRET set_authusingalias(cmd_rec *cmd)
Comments: Configuration directive handler for the AuthUsingAlias directive.

Source File:
modules/mod_core.c

set_class

Declaration:
  MODRET set_class(cmd_rec *cmd)
Comments: Configuration directive handler for the Class directive.

Source File:
modules/mod_core.c

set_classes

Declaration:
  MODRET set_classes(cmd_rec *cmd)
Comments: Configuration directive handler for the Classes directive.

Source File:
modules/mod_core.c

set_commandbuffersize

Declaration:
  MODRET set_commandbuffersize(cmd_rec *cmd)
Comments: Configuration directive handler for the CommandBufferSize directive.

Source File:
modules/mod_core.c

set_daemon_rlimits

Declaration:
  void set_daemon_rlimits(void)
Source File:
src/main.c

set_defaultaddress

Declaration:
  MODRET set_defaultaddress(cmd_rec *cmd)
Comments: Configuration directive handler for the DefaultAddress directive.

Source File:
modules/mod_core.c

set_defaultserver

Declaration:
  MODRET set_defaultserver(cmd_rec *cmd)
Comments: Configuration directive handler for the DefaultServer directive.

Source File:
modules/mod_core.c

set_defaulttransfermode

Declaration:
  MODRET set_defaulttransfermode(cmd_rec *cmd)
Comments: Configuration directive handler for the DefaultTransferMode directive.

Source File:
modules/mod_core.c

set_deferwelcome

Declaration:
  MODRET set_deferwelcome(cmd_rec *cmd)
Comments: Configuration directive handler for the DeferWelcome directive.

Source File:
modules/mod_core.c

set_deleteabortedstores

Declaration:
  MODRET set_deleteabortedstores(cmd_rec *cmd)
Comments: Configuration directive handler for the DeleteAbortedStores directive.

Source File:
modules/mod_core.c

set_denyall

Declaration:
  MODRET set_denyall(cmd_rec *cmd)
Comments: Configuration directive handler for the DenyAll directive.

Source File:
modules/mod_core.c

set_denyfilter

Declaration:
  MODRET set_denyfilter(cmd_rec *cmd)
Comments: Configuration directive handler for the DenyFilter directive.

Source File:
modules/mod_core.c

set_dirfakegroup

Declaration:
  MODRET set_dirfakegroup(cmd_rec *cmd)
Comments: Configuration directive handler for the DirFakeGroup directive.

Source File:
modules/mod_ls.c

set_dirfakemode

Declaration:
  MODRET set_dirfakemode(cmd_rec *cmd)
Comments: Configuration directive handler for the DirFakeMode directive.

Source File:
modules/mod_ls.c

set_dirfakeuser

Declaration:
  MODRET set_dirfakeuser(cmd_rec *cmd)
Comments: Configuration directive handler for the DirFakeUser directive.

Source File:
modules/mod_ls.c

set_displayconnect

Declaration:
  MODRET set_displayconnect(cmd_rec *cmd)
Comments: Configuration directive handler for the DisplayConnect directive.

Source File:
modules/mod_core.c

set_displayfirstchdir

Declaration:
  MODRET set_displayfirstchdir(cmd_rec *cmd)
Comments: Configuration directive handler for the DisplayFirstChdir directive.

Source File:
modules/mod_core.c

set_displaygoaway

Declaration:
 i MODRET set_displaygoaway(cmd_rec *cmd)
Comments: Configuration directive handler for the DisplayGoAway directive.

Source File:
modules/mod_core.c

set_displaylogin

Declaration:
  MODRET set_displaylogin(cmd_rec *cmd)
Comments: Configuration directive handler for the DisplayLogin directive.

Source File:
modules/mod_core.c

set_displayquit

Declaration:
  MODRET set_displayquit(cmd_rec *cmd)
Comments: Configuration directive handler for the DisplayQuit directive.

Source File:
modules/mod_core.c

set_group

Declaration:
  MODRET set_group(cmd_rec *cmd)
Comments: Configuration directive handler for the Group directive.

Source File:
modules/mod_core.c

set_grouppassword

Declaration:
  MODRET set_grouppassword(cmd_rec *cmd)
Comments: Configuration directive handler for the GroupPassword directive.

Source File:
modules/mod_core.c

set_groups

Declaration:
  int set_groups(pool *p, gid_t primary_gid, array_header *suppl_gids)
Source File:
src/auth.c

set_hiddenstores

Declaration:
  MODRET set_hiddenstores(cmd_rec *cmd)
Comments: Configuration directive handler for the HiddenStores directive.

Source File:
modules/mod_xfer.c

set_hidefiles

Declaration:
  MODRET set_hidefiles(cmd_rec *cmd)
Comments: Configuration directive handler for the HideFiles directive.

Source File:
modules/mod_core.c

set_hidenoaccess

Declaration:
  MODRET set_hidenoaccess(cmd_rec *cmd)
Comments: Configuration directive handler for the HideNoAccess directive.

Source File:
modules/mod_core.c

set_identlookups

Declaration:
  MODRET set_identlookups(cmd_rec *cmd)
Comments: Configuration directive handler for the IdentLookups directive.

Source File:
modules/mod_core.c

set_ignorehidden

Declaration:
  MODRET set_ignorehidden(cmd_rec *cmd)
Comments: Configuration directive handler for the IgnoreHidden directive.

Source File:
modules/mod_core.c

set_loginpasswordprompt

Declaration:
  MODRET set_loginpasswordprompt(cmd_rec *cmd)
Comments: Configuration directive handler for the LoginPasswordPrompt directive.

Source File:
modules/mod_auth.c

set_lsdefaultoptions

Declaration:
  MODRET set_lsdefaultoptions(cmd_rec *cmd)
Comments: Configuration directive handler for the LsDefaultOptions directive.

Source File:
modules/mod_ls.c

set_maxclients

Declaration:
  MODRET set_maxclients(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxClients directive.

Source File:
modules/mod_core.c

set_maxconnrate

Declaration:
  MODRET set_maxconnrate(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxConnectionRate directive.

Source File:
modules/mod_core.c

set_maxfilesize

Declaration:
  MODRET set_maxfilesize(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxRetrieveFileSize and MaxStoreFileSize directives.

Source File:
modules/mod_xfer.c

set_maxhostclients

Declaration:
  MODRET set_maxhostclients(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxClientsPerHost directive.

Source File:
modules/mod_core.c

set_maxhostsperuser

Declaration:
  MODRET set_maxhostsperuser(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxHostsPerUser directive.

Source File:
modules/mod_core.c

set_maxinstances

Declaration:
  MODRET set_maxinstances(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxInstances directive.

Source File:
modules/mod_core.c

set_maxloginattempts

Declaration:
  MODRET set_maxloginattempts(cmd_rec *cmd)
Comments: Configuration directive handler for the MaxLoginAttempts directive.

Source File:
modules/mod_core.c

set_multilinerfc2228

Declaration:
  MODRET set_multilinerfc2228(cmd_rec *cmd)
Comments: Configuration directive handler for the MultilineRFC2228 directive.

Source File:
modules/mod_core.c

set_passiveports

Declaration:
  MODRET set_passiveports(cmd_rec *cmd)
Comments: Configuration directive handler for the PassivePorts directive.

Source File:
modules/mod_core.c

set_pathallowfilter

Declaration:
  MODRET set_pathallowfilter(cmd_rec *cmd)
Comments: Configuration directive handler for the PathAllowFilter directive.

Source File:
modules/mod_core.c

set_pathdenyfilter

Declaration:
  MODRET set_pathdenyfilter(cmd_rec *cmd)
Comments: Configuration directive handler for the PathDenyFilter directive.

Source File:
modules/mod_core.c

set_persistentpasswd

Declaration:
  MODRET set_persistentpasswd(cmd_rec *cmd)
Comments: Configuration directive handler for the PersistentPasswd directive.

Source File:
modules/mod_auth_unix.c

set_pidfile

Declaration:
  MODRET set_pidfile(cmd_rec *cmd)
Comments: Configuration directive handler for the PidFile directive.

Source File:
modules/mod_core.c

set_proc_title

Declaration:
  static void set_proc_title(char *fmt, ...)
Source File:
src/main.c

set_regex

Declaration:
  MODRET set_regex(cmd_rec *cmd, char *param, char *type) {
Source File:
modules/mod_core.c

set_requirevalidshell

Declaration:
  MODRET set_requirevalidshell(cmd_rec *cmd)
Comments: Configuration directive handler for the RequireValidShell directive.

Source File:
modules/mod_core.c

set_rlimitcpu

Declaration:
  MODRET set_rlimitcpu(cmd_rec *cmd)
Comments: Configuration directive handler for the RLimitCPU directive.

Source File:
modules/mod_core.c

set_rlimitmemory

Declaration:
  MODRET set_rlimitmemory(cmd_rec *cmd)
Comments: Configuration directive handler for the RLimitMemory directive.

Source File:
modules/mod_core.c

set_rlimitopenfiles

Declaration:
  MODRET set_rlimitopenfiles(cmd_rec *cmd)
Comments: Configuration directive handler for the RLimitOpenFiles directive.

Source File:
modules/mod_core.c

set_rootlogin

Declaration:
  MODRET set_rootlogin(cmd_rec *cmd)
Comments: Configuration directive handler for the RootLogin directive.

Source File:
modules/mod_auth.c

set_scoreboardfile

Declaration:
  MODRET set_scoreboardfile(cmd_rec *cmd)
Comments: Configuration directive handler for the ScoreboardFile directive.

Source File:
modules/mod_core.c

set_serveradmin

Declaration:
  MODRET set_serveradmin(cmd_rec *cmd)
Comments: Configuration directive handler for the ServerAdmin directive.

Source File:
modules/mod_core.c

set_serverident

Declaration:
  MODRET set_serverident(cmd_rec *cmd)
Comments: Configuration directive handler for the ServerIdent directive.

Source File:
modules/mod_core.c

set_servername

Declaration:
  MODRET set_servername(cmd_rec *cmd)
Comments: Configuration directive handler for the ServerName directive.

Source File:
modules/mod_core.c

set_serverport

Declaration:
  MODRET set_serverport(cmd_rec *cmd)
Comments: Configuration directive handler for the Port directive.

Source File:
modules/mod_core.c

set_servertype

Declaration:
  MODRET set_servertype(cmd_rec *cmd)
Comments: Configuration directive handler for the ServerType directive.

Source File:
modules/mod_core.c

set_server_privs

Declaration:
  static void set_server_privs(void)
Source File:
src/main.c

set_session_rlimits

Declaration:
  void set_session_rlimits(void)
Source File:
src/main.c

set_showsymlinks

Declaration:
  MODRET set_showsymlinks(cmd_rec *cmd)
Comments: Configuration directive handler for the ShowSymlinks directive.

Source File:
modules/mod_core.c

set_sig_alarm

Declaration:
  void set_sig_alarm(void)
Source File:
src/timers.c

set_socketbindtight

Declaration:
  MODRET set_socketbindtight(cmd_rec *cmd)
Comments: Configuration directive handler for the SocketBindTight directive.

Source File:
modules/mod_core.c

set_storeuniqueprefix

Declaration:
  MODRET set_storeuniqueprefix(cmd_rec *cmd)
Comments: Configuration directive handler for the StoreUniquePrefix directive.

Source File:
modules/mod_xfer.c

set_syslogfacility

Declaration:
  MODRET set_syslogfacility(cmd_rec *cmd)
Comments: Configuration directive handler for the SyslogFacility directive.

Source File:
modules/mod_core.c

set_sysloglevel

Declaration:
  MODRET set_sysloglevel(cmd_rec *cmd)
Comments: Configuration directive handler for the SyslogLevel directive.

Source File:
modules/mod_core.c

set_systemlog

Declaration:
  MODRET set_systemlog(cmd_rec *cmd)
Comments: Configuration directive handler for the SystemLog directive.

Source File:
modules/mod_log.c

set_tcpbacklog

Declaration:
  MODRET set_tcpbacklog(cmd_rec *cmd)
Comments: Configuration directive handler for the tcpBackLog directive.

Source File:
modules/mod_core.c

set_tcpnodelay

Declaration:
  MODRET set_tcpnodelay(cmd_rec *cmd)
Comments: Configuration directive handler for the tcpNoDelay directive.

Source File:
modules/mod_core.c

set_tcpreceivewindow

Comments: Configuration directive handler for the tcpReceiveWindow directive.

Declaration:
  MODRET set_tcpreceivewindow(cmd_rec *cmd)
Source File:
modules/mod_core.c

set_tcpsendwindow

Declaration:
  MODRET set_tcpsendwindow(cmd_rec *cmd)
Comments: Configuration directive handler for the tcpSendWindow directive.

Source File:
modules/mod_core.c

set_timeoutidle

Declaration:
  MODRET set_timeoutidle(cmd_rec *cmd)
Comments: Configuration directive handler for the TimeoutIdle directive.

Source File:
modules/mod_core.c

set_timeoutlogin

Declaration:
  MODRET set_timeoutlogin(cmd_rec *cmd)
Comments: Configuration directive handler for the TimeoutLogin directive.

Source File:
modules/mod_auth.c

set_timeoutnoxfer

Declaration:
  MODRET set_timeoutnoxfer(cmd_rec *cmd)
Comments: Configuration directive handler for the TimeoutNoTransfer directive.

Source File:
modules/mod_core.c

set_timeoutsession

Declaration:
  MODRET set_timeoutsession(cmd_rec *cmd)
Comments: Configuration directive handler for the TimeoutSession directive.

Source File:
modules/mod_auth.c

set_timeoutstalled

Declaration:
  MODRET set_timeoutstalled(cmd_rec *cmd)
Comments: Configuration directive handler for the TimeoutStalled directive.

Source File:
modules/mod_core.c

set_timesgmt

Declaration:
  MODRET set_timesgmt(cmd_rec *cmd)
Comments: Configuration directive handler for the TimesGMT directive.

Source File:
modules/mod_core.c

set_umask

Declaration:
  MODRET set_umask(cmd_rec *cmd)
Comments: Configuration directive handler for the Umask directive.

Source File:
modules/mod_core.c

set_useftpusers

Declaration:
  MODRET set_useftpusers(cmd_rec *cmd)
Comments: Configuration directive handler for the UseFtpUsers directive.

Source File:
modules/mod_core.c

set_useglobbing

Declaration:
  MODRET set_useglobbing(cmd_rec *cmd)
Comments: Configuration directive handler for the UseGlobbing directive.

Source File:
modules/mod_ls.c

set_user

Declaration:
  MODRET set_user(cmd_rec *cmd)
Comments: Configuration directive handler for the User directive.

Source File:
modules/mod_core.c

set_useralias

Declaration:
  MODRET set_useralias(cmd_rec *cmd)
Comments: Configuration directive handler for the UserAlias directive.

Source File:
modules/mod_core.c

set_userpassword

Declaration:
  MODRET set_userpassword(cmd_rec *cmd)
Comments: Configuration directive handler for the UserPassword directive.

Source File:
modules/mod_core.c

set_usereversedns

Declaration:
  MODRET set_usereversedns(cmd_rec *cmd)
Comments: Configuration directive handler for the UseReverseDNS directive.

Source File:
modules/mod_core.c

set_wtmplog

Declaration:
  MODRET set_wtmplog(cmd_rec *cmd)
Comments: Configuration directive handler for the WtmpLog directive.

Source File:
modules/mod_core.c

show_usage

Declaration:
  static void show_usage(char *progname)
Source File:
src/ftpshut.c

shutdown_exit

Declaration:
  void shutdown_exit(void *d1, void *d2, void *d3, void *d4)
Source File:
src/main.c

sig_abort

Declaration:
  static RETSIGTYPE sig_abort(int sig)
Source File:
src/main.c

sig_alarm

Declaration:
  void sig_alarm(int signum)
Source File:
src/timers.c

sig_child

Declaration:
  static RETSIGTYPE sig_child(int sig)
Comments: Upon receipt of a SIGCHLD, this function will first block SIGTERM (see
install_signal_handlers() for an explanation for this), then calls waitpid(2) repeatedly, until there are no child process PIDs to be reaped.

Source File: src/main.c

sig_debug

Declaration:
  static RETSIGTYPE sig_debug(int sig)
Source File:
src/main.c

sig_disconnect

Declaration:
  static RETSIGTYPE sig_disconnect(int sig)
Source File:
src/main.c

sig_rehash

Declaration:
  static RETSIGTYPE sig_rehash(int sig)
Comments: This is the signal handler for the SIGHUP signal, usually sent to the master daemon PID (sending SIGHUP to children PIDs can cause trouble). The signal causes the server to re-parse the configuration files, and is propagated to all children by the master daemon.

Source File:
src/main.c

sig_terminate

Declaration:
  static RETSIGTYPE sig_terminate(int sig)
Source File:
src/main.c

site_chgrp

Declaration:
  MODRET site_chgrp(cmd_rec *cmd)
Source File:
modules/mod_site.c

site_chmod

Declaration:
  MODRET site_chmod(cmd_rec *cmd)
Source File:
modules/mod_site.c

site_cmd

Declaration:
  MODRET site_cmd(cmd_rec *cmd)
Comments: Command handler for the SITE FTP comand.

Source File:
modules/mod_core.c

site_dispatch

Declaration:
  modret_t *site_dispatch(cmd_rec *cmd)
Source File:
modules/mod_site.c

site_help

Declaration:
  MODRET site_help(cmd_rec *cmd)
Source File:
modules/mod_site.c

site_post_cmd

Declaration:
  MODRET site_post_cmd(cmd_rec *cmd)

Source File:
modules/mod_site.c

site_pre_cmd

Declaration:
  MODRET site_pre_cmd(cmd_rec *cmd)

Source File:
modules/mod_site.c

sleep_cb

Declaration:
  static int sleep_cb(CALLBACK_FRAME)
Source File:
src/timers.c

sortfiles

Declaration:
  void sortfiles(cmd_rec *cmd)
Source File:
modules/mod_ls.c

sreaddir

Declaration:
  char **sreaddir(pool *workp, const char *dirname, const int sort)
Source File:
modules/mod_ls.c

sreplace

Declaration:
  char *sreplace(pool *p, char *s, ...)
Comments: Provides string replacement, substituting a given substring in s with the provided replacement. After the s argument, function arguments should be in substr, replacement pairs. For example, given a string "Hello, %u", this function is used to replace the "%u" with the current user like so:
  newstr = sreplace(p, oldstr, "%u", session.user, NULL);
Multiple such substr, replacement pairs can be given in the same call.

Notes: As with many varargs functions, it is imperative that the last argument to this function be NULL. You have been warned.

Source File:
src/support.c

sstrcat

Declaration:
  char *sstrcat(char *dest, const char *src, size_t n)
Comments: This function provides a "safe" version of strcat(), saving room for a \0 at the end of dest and refusing to concatenate more than n bytes.

Source File:
src/support.c

sstrncpy

Declaration:
  char *sstrncpy(char *dest, const char *src, size_t n)
Comments: This function provides a "safe" version of strncpy(), saving room for a \0 at the end of dest and refusing to copy more than n bytes.

Source File:
src/support.c

stalled_timeout_cb

Declaration:
  static int stalled_timeout_cb(CALLBACK_FRAME)
Source File:
src/data.c

standalone_main

Declaration:
  void standalone_main(void)
Source File:
src/main.c

start_ifdefine

Declaration:
  MODRET start_ifdefine(cmd_rec *cmd)
Comments: Configuration directive handler for the <IfDefine> directive.

Source File:
modules/mod_core.c

start_ifmodule

Declaration:
  MODRET start_ifmodule(cmd_rec *cmd)
Comments: Configuration directive handler for the <IfModule> directive.

Source File:
modules/mod_core.c

start_new_server

Declaration:
  server_rec *start_new_server(const char *addr)
Source File:
src/dirtree.c

start_sub_config

Declaration:
  config_rec *start_sub_config(const char *name)
Source File:
src/dirtree.c

std_chdir

Declaration:
  static int std_chdir(fsdir_t *f, const char *path)
Source File:
src/fs.c

std_chmod

Declaration:
  static int std_chmod(fsdir_t *f, const char *path, mode_t mode)
Source File:
src/fs.c

std_chown

Declaration:
  static int std_chown(fsdir_t *f, const char *path, uid_t uid, gid_t gid)
Source File:
src/fs.c

std_close

Declaration:
  static int std_close(fsdir_t *f, int fd)
Source File:
src/fs.c

std_closedir

Declaration:
  static int std_closedir(fsdir_t *f, void *dir)
Source File:
src/fs.c

std_creat

Declaration:
  static int std_creat(fsdir_t *f, const char *path, mode_t mode)
Source File:
src/fs.c

std_link

Declaration:
  static int std_link(fsdir_t *f, const char *path1, const char *path2)
Source File:
src/fs.c

std_lseek

Declaration:
  static off_t std_lseek(fsdir_t *f, int fd, off_t offset, int whence)
Source File:
src/fs.c

std_lstat

Declaration:
  static int std_lstat(fsdir_t *f, const char *path, struct stat *sbuf)
Source File:
src/fs.c

std_open

Declaration:
  static int std_open(fsdir_t *f, const char *path, int access)
Source File:
src/fs.c

std_opendir

Declaration:
  static void *std_opendir(fsdir_t *f, const char *path)
Source File:
src/fs.c

std_read

Declaration:
  static int std_read(fsdir_t *f, int fd, char *buf, size_t size)
Source File:
src/fs.c

std_readdir

Declaration:
  static struct dirent *std_readdir(fsdir_t *f, void *dir)
Source File:
src/fs.c

std_readlink

Declaration:
  static int std_readlink(fsdir_t *f, const char *path, char *buf, size_t max)
Source File:
src/fs.c

std_rename

Declaration:
  static int std_rename(fsdir_t *f, const char *ren_from, const char *ren_to)
Source File:
src/fs.c

std_stat

Declaration:
  static int std_stat(fsdir_t *f, const char *path, struct stat *sbuf)
Source File:
src/fs.c

std_symlink

Declaration:
  static int std_symlink(fsdir_t *f, const char *path1, const char *path2)
Source File:
src/fs.c

std_unlink

Declaration:
  static int std_unlink(fsdir_t *f, const char *path)
Source File:
src/fs.c

std_write

Declaration:
  static int std_write(fsdir_t *f, int fd, const char *buf, size_t size)
Source File:
src/fs.c

stor_abort

Declaration:
  static void stor_abort(void)
Source File:
modules/mod_xfer.c

stor_complete

Declaration:
  static void stor_complete(void)
Source File:
modules/mod_xfer.c

strip_end

Declaration:
  char *strip_end(char *s, char *ch)
Source File:
src/support.c

strsep

Declaration:
  char *strsep(char **stringp, const char *delim)
Source File:
lib/strsep.c

supp_getgrent

Declaration:
  static struct group *supp_getgrent(const char *buf)
Source File:
lib/pwgrent.c

supp_getpwent

Declaration:
  static struct passwd *supp_getpwent(const char *buf)
Source File:
lib/pwgrent.c

supp_grplist

Declaration:
  static char **supp_grplist(char *s)
Source File:
lib/pwgrent.c

timer_cmp

Declaration:
  static int timer_cmp(timer_t *t1, timer_t *t2)
Source File:
src/timers.c

timer_sleep

Declaration:
  int timer_sleep(int seconds)
Source File:
src/timers.c

auth_unix_init

Declaration:
  static int auth_unix_init(void)
Source File:
modules/mod_auth_unix.c

auth_unix_sess_init

Declaration:
  static int auth_unix_sess_init(void)
Source File:
modules/mod_auth_unix.c

xaset_copy

Declaration:
  xaset_t *xaset_copy(pool *pool, xaset_t *set, size_t msize, XASET_MCOPY copyf)
Comments: Perform an exact copy of the entire set, returning the new set. msize specifies the size of each member. If copyf is non-NULL, it is called instead to copy each member.

Returns NULL if out of memory exception occurs.

Source File:
src/sets.c

xaset_create

Declaration:
  xaset_t *xaset_create(pool *pool, XASET_COMPARE compf)
Comments: Create a new set. compf is a pointer to the function used to compare members of the set.

Returns 1, 0, or -1 after the fashion of strcmp. Returns NULL if memory allocation fails.

Source File:
src/sets.c

xaset_insert

Declaration:
  int xaset_insert(xaset_t *set, xasetmember_t *member)
Comments: Inserts a new member into an existing set. The member is inserted at the beginning of the list.

Returns 1 if successful, 0 if one or more arguments are invalid or something is wrong with the set, -1 if there's an error (not used).

Source File:
src/sets.c

xaset_insert_end

Declaration:
  int xaset_insert_end(xaset_t *set, xasetmember_t *member)
Comments: Inserts a new xasetmember_t member into an existing set at the end of the list.

Source File:
src/sets.c

xaset_insert_sort

Declaration:
  int xaset_insert_sort(xaset_t *set, xasetmember_t *member, int dupes_allowed)
Comments: Inserts a new member into an existing set set, sorted using the set's comparison callback function.

If dupes_allowed is non-zero, returns 0 and the member is not added to the set. Otherwise, it is added immediately before the first duplicate. If the set is not empty and not presorted, results are undefined.

Returns 1 if successful, 0 if there are bad arguments or if it is a duplicate member, -1 if there is an error (not used, but an applicable error would be errno).

Source File:
src/sets.c

xaset_remove

Declaration:
  int xaset_remove(xaset_t *set, xasetmember_t *member)
Comments: Remove a member from a set. The set need not be sorted. Note that this does NOT free the memory used by the removed member. No check is performed to validate that the member is truly a member of set.

Returns 1 if successful, 0 if the arguments are invalid, -1 if there's an error (check errno, unused at this time).

Source File:
src/sets.c

xaset_subtract

Declaration:
  xaset_t *xaset_subtract(pool *pool, xaset_t *set1, xaset_t *set2, size_t msize,
    XASET_MCOPY copyf)
Comments: Perform set subtraction: set1 - set2, creating a new set composed of all the elements in set1 that are not in set2. NULL is returned if a new set cannot be created (out of memory), or either set1 or set2 are NULL. If copyf is non-NULL, it is used to copy each applicable element to the new set. If either of the two sets is unsorted, the result will be undefined. set1's comparison callback function is used when comparing members of each set.

Source File:
src/sets.c

xaset_union

Declaration:
  xaset_t *xaset_union(pool *pool, xaset_t *set1, xaset_t *set2, size_t msize,
    XASET_MCOPY copyf) 
Comments: Perform a set union. The two sets do not need to be sorted, however the returned set will be. Duplicate entries are, as per normal set logic, removed.

The return value is the new set, or NULL if out of memory, or one or more of the arguments are invalid.

Source File:
src/sets.c

xfer_abor

Declaration:
  MODRET xfer_abor(cmd_rec *cmd)
Comments: Command handler for the ABOR FTP command.

Source File:
modules/mod_xfer.c

xfer_allo

Declaration:
  MODRET xfer_allo(cmd_rec *cmd)
Comments: Command handler for the ALLO FTP command.

Source File:
modules/mod_xfer.c

xfer_err_cleanup

Declaration:
  MODRET xfer_err_cleanup(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_exit_cb

Declaration:
  static void xfer_exit_cb(void)
Source File:
modules/mod_xfer.c

xfer_log_retr

Declaration:
  MODRET xfer_log_retr(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_log_stor

Declaration:
  MODRET xfer_log_stor(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_mode

Declaration:
  MODRET xfer_mode(cmd_rec *cmd)
Comments: Command handler for the MODE FTP command.

Source File:
modules/mod_xfer.c

xfer_post_stou

Declaration:
  MODRET xfer_post_stou(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_pre_appe

Declaration:
  MODRET xfer_pre_appe(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_pre_retr

Declaration:
  MODRET xfer_pre_retr(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_pre_stor

Declaration:
  MODRET xfer_pre_stor(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_pre_stou

Declaration:
  MODRET xfer_pre_stou(cmd_rec *cmd)
Source File:
modules/mod_xfer.c

xfer_rest

Declaration:
  MODRET xfer_rest(cmd_rec *cmd)
Comments: Command handler for the REST FTP command.

Source File:
modules/mod_xfer.c

xfer_retr

Declaration:
  MODRET xfer_retr(cmd_rec *cmd)
Comments: Command handler for the RETR FTP command.

Source File:
modules/mod_xfer.c

xfer_sess_init

Declaration:
  static int xfer_sess_init(void)
Source File:
modules/mod_xfer.c

xfer_smnt

Declaration:
  MODRET xfer_smnt(cmd_rec *cmd)
Comments: Command handler for the SMNT FTP command.

Source File:
modules/mod_xfer.c

xfer_stor

Declaration:
  MODRET xfer_stor(cmd_rec *cmd)
Comments: Command handler for the STOR FTP command.

Source File:
modules/mod_xfer.c

xfer_stru

Declaration:
  MODRET xfer_stru(cmd_rec *cmd)
Comments: Command handler for the STRU FTP command.

Source File:
modules/mod_xfer.c

xfer_type

Declaration:
  MODRET xfer_type(cmd_rec *cmd)
Comments: Command handler for the TYPE FTP command.

Source File:
modules/mod_xfer.c

xmalloc

Declaration:
  void *xmalloc(size_t size)
Source File:
src/pool.c


Author: $Author: castaglia $
Last Updated: $Date: 2003/07/24 20:27:40 $


© Copyright 2000-2003 TJ Saunders
All Rights Reserved