netatalk: uam.c File Reference

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
uam.c File Reference
`#include <arpa/inet.h>`
`#include <ctype.h>`
`#include <errno.h>`
`#include <fcntl.h>`
`#include <netinet/in.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/param.h>`
`#include <sys/socket.h>`
`#include <sys/time.h>`
`#include <unistd.h>`
`#include <bstrlib.h>`
`#include <atalk/afp.h>`
`#include <atalk/dsi.h>`
`#include <atalk/globals.h>`
`#include <atalk/logger.h>`
`#include <atalk/util.h>`
`#include <atalk/volume.h>`
`#include "afp_config.h"`
`#include "auth.h"`
`#include "uam_auth.h"`

## Functions
struct uam_mod * | uam_load (AFPObj *obj, const char *path, const char *name)
void | uam_unload (struct uam_mod *mod)
int | uam_register (const int type, const char *path, const char *name,...)
void | uam_unregister (const int type, const char *name)
struct passwd * | uam_getname (void *private, char *name, const int len)
| helper functions for plugin uams
int | uam_checkuser (void *private, const struct passwd *pwd)
int | uam_random_string (AFPObj *obj, char *buf, int len)
| Fill a buffer with cryptographically secure random bytes.
int | uam_afpserver_option (void *private, const int what, void *option, size_t *len)
UAM_MODULE_EXPORT void | append (struct papfile *pf, const char *data, int len)

## Function Documentation

## ◆ append()

UAM_MODULE_EXPORT void append | ( | struct papfile * | pf,
|  | const char * | data,
|  | int | len )

## ◆ uam_afpserver_option()

int uam_afpserver_option | ( | void * | private,
|  | const int | what,
|  | void * | option,
|  | size_t * | len )

## ◆ uam_checkuser()

int uam_checkuser | ( | void * | private,
|  | const struct passwd * | pwd )

## ◆ uam_getname()

struct passwd * uam_getname | ( | void * | private,
|  | char * | name,
|  | const int | len )

helper functions for plugin uams

Parameters

  private | pointer to AFPObj
  name | user name
  len | size of name buffer.

## ◆ uam_load()

struct uam_mod * uam_load | ( | AFPObj * | obj,
|  | const char * | path,
|  | const char * | name )

## ◆ uam_random_string()

int uam_random_string | ( | AFPObj * | obj,
|  | char * | buf,
|  | int | len )

Fill a buffer with cryptographically secure random bytes.

Reads from /dev/urandom, looping until all bytes are filled so the caller always receives a fully-populated nonce. Retries on EINTR; never falls back to a deterministic source.

Parameters

  obj | AFP session object (unused)
  buf | destination buffer
  len | number of bytes to fill; must be a positive multiple of 4

Returns
  0 on success, -1 on error

## ◆ uam_register()

int uam_register | ( | const int | type,
|  | const char * | path,
|  | const char * | name,
|  |  | ... )

## ◆ uam_unload()

void uam_unload | ( | struct uam_mod * | mod | ) |

## ◆ uam_unregister()

void uam_unregister | ( | const int | type,
|  | const char * | name )