mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 13:02:55 +00:00
- Refactor the way the WalProposerMain function is called when started with --sync-safekeepers. The postgres binary now explicitly loads the 'neon.so' library and calls the WalProposerMain in it. This is simpler than the global function callback "hook" we previously used. - Move the WAL redo process code to a new library, neon_walredo.so, and use the same mechanism as for --sync-safekeepers to call the WalRedoMain function, when launched with --walredo argument. - Also move the seccomp code to neon_walredo.so library. I kept the configure check in the postgres side for now, though.
23 lines
593 B
C
23 lines
593 B
C
#ifndef NEON_SECCOMP_H
|
|
#define NEON_SECCOMP_H
|
|
|
|
#include <seccomp.h>
|
|
|
|
typedef struct {
|
|
int psr_syscall; /* syscall number */
|
|
uint32 psr_action; /* libseccomp action, e.g. SCMP_ACT_ALLOW */
|
|
} PgSeccompRule;
|
|
|
|
#define PG_SCMP(syscall, action) \
|
|
(PgSeccompRule) { \
|
|
.psr_syscall = SCMP_SYS(syscall), \
|
|
.psr_action = (action), \
|
|
}
|
|
|
|
#define PG_SCMP_ALLOW(syscall) \
|
|
PG_SCMP(syscall, SCMP_ACT_ALLOW)
|
|
|
|
extern void seccomp_load_rules(PgSeccompRule *syscalls, int count);
|
|
|
|
#endif /* NEON_SECCOMP_H */
|