netatalk: unix.h Source File

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
include/atalk/unix.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13*/
14
15#ifndef ATALK_UNIX_H
16#define ATALK_UNIX_H
17
18#ifdef HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <dirent.h>
23#include <sys/stat.h>
24#include <sys/types.h>
25
26#include <atalk/globals.h>
27
28#define NETATALK_DIOSZ_STACK 65536
29#define NETATALK_DIOSZ_HEAP (1024*1024)
30
31struct vol;
32
33/* vfs/unix.c */
34extern int netatalk_unlink(const char *name);
35extern int netatalk_unlinkat(int dirfd, const char *name);
36extern int statat(int dirfd, const char *path, struct stat *st);
37extern DIR *opendirat(int dirfd, const char *path);
38
39/* rmdir ENOENT not an error */
40extern int netatalk_rmdir(int dirfd, const char *name);
41extern int netatalk_rmdir_all_errors(int dirfd, const char *name);
42
43extern int setfilmode(const struct vol *vol, const char *name, mode_t mode,
44 struct stat *st);
45extern int dir_rx_set(mode_t mode);
46extern int unix_rename(int sfd, const char *oldpath, int dfd,
47 const char *newpath);
48extern int copy_file(int sfd, const char *src, const char *dst, mode_t mode);
49extern int copy_file_fd(int sfd, int dfd);
50extern int copy_ea(const char *ea, int sfd, const char *src, const char *dst,
51 mode_t mode);
52
53extern void become_root(void);
54extern void unbecome_root(void);
55extern int gmem(gid_t gid, int ngroups, gid_t *groups);
56extern int set_groups(AFPObj *obj, struct passwd *pwd);
57extern const char *print_groups(int ngroups, gid_t *groups);
58#endif /* ATALK_UNIX_H */
groups
gid_t * groups
ngroups
int ngroups
config.h
globals.h
unbecome_root
void unbecome_root(void)
Definition libatalk/util/unix.c:194
setfilmode
int setfilmode(const struct vol *vol, const char *name, mode_t mode, struct stat *st)
Definition libatalk/vfs/unix.c:36
netatalk_rmdir
int netatalk_rmdir(int dirfd, const char *name)
System rmdir with afp error code, but ENOENT is not an error.
Definition libatalk/vfs/unix.c:109
become_root
void become_root(void)
Definition libatalk/util/unix.c:178
copy_file_fd
int copy_file_fd(int sfd, int dfd)
Definition libatalk/vfs/unix.c:151
copy_file
int copy_file(int sfd, const char *src, const char *dst, mode_t mode)
Definition libatalk/vfs/unix.c:191
set_groups
int set_groups(AFPObj *obj, struct passwd *pwd)
Definition libatalk/util/unix.c:712
copy_ea
int copy_ea(const char *ea, int sfd, const char *src, const char *dst, mode_t mode)
Copy an EA from one file to another.
Definition libatalk/vfs/unix.c:243
dir_rx_set
int dir_rx_set(mode_t mode)
Definition libatalk/vfs/unix.c:30
print_groups
const char * print_groups(int ngroups, gid_t *groups)
Definition libatalk/util/unix.c:744
gmem
int gmem(gid_t gid, int ngroups, gid_t *groups)
Definition libatalk/util/unix.c:599
netatalk_unlinkat
int netatalk_unlinkat(int dirfd, const char *name)
Definition libatalk/vfs/unix.c:282
opendirat
DIR * opendirat(int dirfd, const char *path)
opendir wrapper for *at semantics support
Definition libatalk/vfs/unix.c:361
unix_rename
int unix_rename(int sfd, const char *oldpath, int dfd, const char *newpath)
This is equivalent of unix rename().
Definition libatalk/vfs/unix.c:318
netatalk_rmdir_all_errors
int netatalk_rmdir_all_errors(int dirfd, const char *name)
system rmdir with afp error code.
Definition libatalk/vfs/unix.c:70
statat
int statat(int dirfd, const char *path, struct stat *st)
stat/fsstatat multiplexer
Definition libatalk/vfs/unix.c:344
netatalk_unlink
int netatalk_unlink(const char *name)
system unlink with afp error code.
Definition libatalk/vfs/unix.c:124
obj
static AFPObj obj
Definition netatalk.c:69
AFPObj
Definition globals.h:166
ea
Definition ea.h:164
path
Definition include/atalk/directory.h:123
vol
Definition include/atalk/volume.h:33