#include <stdint.h>
#include <atalk/globals.h>
#include <atalk/volume.h>
Go to the source code of this file.
◆ afp_config_free()
void afp_config_free |
( |
AFPObj * | obj | ) |
|
|
extern |
◆ afp_config_parse()
int afp_config_parse |
( |
AFPObj * | AFPObj, |
|
|
char * | processname ) |
|
extern |
Initialize an AFPObj and options from ini config file
◆ getdefextmap()
struct extmap * getdefextmap |
( |
void | | ) |
|
◆ getextmap()
struct extmap * getextmap |
( |
const char * | path | ) |
|
◆ getvolbyname()
struct vol * getvolbyname |
( |
const char * | name | ) |
|
|
extern |
◆ getvolbypath()
struct vol * getvolbypath |
( |
AFPObj * | obj, |
|
|
const char * | path ) |
|
extern |
Search volume by path, creating user home vols as necessary
Path may be absolute or relative. Ordinary volume structs are created when the ini config is initially parsed (load_volumes()), but user volumes are as load_volumes() only can create the user volume of the logged in user in an AFP session in afpd, but not when called from e.g. cnid_metad or dbd. Both cnid_metad and dbd thus need a way to lookup and create struct vols for user home by path. This is what this func does as well.
(1) Search "normal" volume list (2) Check if theres a [Homes] section, load_volumes() remembers this for us (3) If there is, match "path" with "basedir regex" to get the user home parent dir (4) Built user home path by appending the basedir matched in (3) and appending the username (5) The next path element then is the username (5b) getvolbypath() assumes that the user home directory has the same name as the username. If that is not true, getuserbypath() is called and tries to retrieve the username from the directory owner, checking its validity (6) Append [Homes]->path subdirectory if defined (7) Create volume
- Parameters
-
obj | (rw) handle |
path | (r) path, may be relative or absolute |
◆ getvolbyvid()
struct vol * getvolbyvid |
( |
const uint16_t | vid | ) |
|
|
extern |
◆ getvolumes()
struct vol * getvolumes |
( |
void | | ) |
|
|
extern |
◆ load_charset()
int load_charset |
( |
struct vol * | vol | ) |
|
|
extern |
Load charsets for a volume
◆ load_volumes()
Initialize volumes and load ini configfile
- Parameters
-
obj | (r) handle |
flags | (r) flags controlling volume load behaviour: LV_DEFAULT: load shares in a user/session context, this honors authorisation LV_ALL: load shares that are available in the config file LV_FORCE: reload file even though the timestamp wasn't changed |
◆ unload_volumes()
void unload_volumes |
( |
AFPObj * | obj | ) |
|
|
extern |
◆ volume_free()
void volume_free |
( |
struct vol * | vol | ) |
|
|
extern |
◆ volume_unlink()
void volume_unlink |
( |
struct vol * | volume | ) |
|
|
extern |
Remove a volume from the linked list of volumes