~ubuntu-branches/debian/sid/trinity/sid

« back to all changes in this revision

Viewing changes to syscalls/linkat.c

  • Committer: Package Import Robot
  • Author(s): gustavo panizzo
  • Date: 2014-01-17 21:10:15 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140117211015-k2qbnpu0osa5mlil
Tags: 1.3-1
* New upstream version 1.3.
* Removed wrong dependency on linux-headers. (Closes: #733771).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
         int, newdfd, const char __user *, newname, int, flags)
4
4
 */
5
5
#include <fcntl.h>
 
6
#include <stdlib.h>
 
7
#include "shm.h"
6
8
#include "sanitise.h"
7
9
#include "compat.h"
8
10
 
 
11
static void sanitise_linkat(int childno)
 
12
{
 
13
        /* .. If oldpath is relative and olddirfd is the special value AT_FDCWD, then oldpath is
 
14
         * interpreted relative to the current working directory of the calling process  */
 
15
        if ((rand() % 100) == 0)
 
16
                shm->a1[childno] = AT_FDCWD;
 
17
}
 
18
 
9
19
struct syscall syscall_linkat = {
10
20
        .name = "linkat",
11
21
        .num_args = 5,
12
22
        .arg1name = "olddfd",
13
23
        .arg1type = ARG_FD,
14
24
        .arg2name = "oldname",
15
 
        .arg2type = ARG_ADDRESS,
 
25
        .arg2type = ARG_PATHNAME,
16
26
        .arg3name = "newdfd",
17
27
        .arg3type = ARG_FD,
18
28
        .arg4name = "newname",
19
 
        .arg4type = ARG_ADDRESS,
 
29
        .arg4type = ARG_PATHNAME,
20
30
        .arg5name = "flags",
21
31
        .arg5type = ARG_LIST,
22
32
        .arg5list = {
25
35
        },
26
36
        .flags = NEED_ALARM,
27
37
        .group = GROUP_VFS,
 
38
        .sanitise = sanitise_linkat,
28
39
};