netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
T2_Dircache_attack.c File Reference

Test the following: More...

`#include "afpcmd.h"`
`#include "afphelper.h"`
`#include "testhelper.h"`

## Functions
STATIC void | test500 ()
STATIC void | test501 ()
STATIC void | test502 ()
STATIC void | test503 ()
STATIC void | test504 ()
STATIC void | test505 ()
STATIC void | test506 ()
void | Dircache_attack_test ()

## Detailed Description

Test the following:

test500()
=========
client 1:
mkdir dir1
mkdir dir2
client 2:
mv dir1 dir2/renamed
client 1:
ls dir2
stat dir2/renamed
Check: CNID must not change
Targets: enumerate()
test501()
=========
client 1:
mkdir dir1
mkdir dir2
client 2:
mv dir1 dir2/renamed
client 1:
stat renamed
Check: CNID must not change
Targets: getfildirparms()
test502()
=========
client 1:
mkdir dir1
mkdir dir2
client 2:
mv dir1 dir2/renamed
client 1:
ls renamed
Check: CNID must not change
Targets: enumerate()
test503()
=========
client 1:
mkdir dir1
mkdir dir2
client 2:
mv dir1 dir2/renamed
client 1:
stat renamed
Check: CNID must not change
Targets: getfildirparms()
test504()
=========
client 1:
mkdir -p dir1/dir2
touch dir1/dir2/file
client 2:
mv dir1 renamed1
client 1:
stat file
Check: CNID must not change
Targets: getfildirparms()
test505()
=========
client 1:
mkdir -p dir1/dir2
client 2:
mv dir1 renamed1
client 1:
stat dir2
Check: CNID must not change
Targets: getfildirparms()
test506()
=========
client 1:
mkdir -p dir1/dir2
client 2:
mv dir1 renamed1
mkdir dir1
client 1:
stat dir2
test503
STATIC void test503()
Definition T2_Dircache_attack.c:348
test502
STATIC void test502()
Definition T2_Dircache_attack.c:271
test500
STATIC void test500()
Definition T2_Dircache_attack.c:126
test504
STATIC void test504()
Definition T2_Dircache_attack.c:419
test505
STATIC void test505()
Definition T2_Dircache_attack.c:489
test501
STATIC void test501()
Definition T2_Dircache_attack.c:200
test506
STATIC void test506()
Definition T2_Dircache_attack.c:561
enumerate
static int enumerate(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen, int ext)
Definition enumerate.c:172
CNID
#define CNID(a, b)
Definition etc/afpd/directory.h:66
p
static gcry_mpi_t p
Definition uams_dhx2_pam.c:39

## Function Documentation

## ◆ Dircache_attack_test()

void Dircache_attack_test | ( |  | ) |

## ◆ test500()

STATIC void test500 | ( |  | ) |

move and rename dir, enumerate new parent, stat renamed dir

## ◆ test501()

STATIC void test501 | ( |  | ) |

move and rename dir, then stat it

## ◆ test502()

STATIC void test502 | ( |  | ) |

move and rename dir, enumerate renamed dir

## ◆ test503()

STATIC void test503 | ( |  | ) |

move and rename dir, stat renamed dir

## ◆ test504()

STATIC void test504 | ( |  | ) |

rename topdir, stat file in subdir of renamed topdir

## ◆ test505()

STATIC void test505 | ( |  | ) |

rename dir, stat subdir in renamed dir

## ◆ test506()

STATIC void test506 | ( |  | ) |

stat subdir in poisened path