don't renameat2 please
So renameat2 now has a glibc wrapper in some recent glibc, which
means that mv can use it, and thus bypass all our clever testing,
and since we can't intercept the actual syscall (gnulib's implementation
apparently doesn't hit the glibc syscall() wrapper?), this results
in files being moved without pseudo knowing about them.
Implementing the semantics properly is Very Hard, but possibly we
can just fail politely for now.
We'll be back to this later.
Seebs
5 years ago
0 | 0 |
2019-04-09:
|
1 | 1 |
* (seebs) Partial fix for db corruption issue.
|
|
2 |
* (seebs) Make a glibc renameat2 wrapper that just fails because
|
|
3 |
implementing renameat2 semantics is Surprisingly Hard.
|
2 | 4 |
|
3 | 5 |
2018-12-15:
|
4 | 6 |
* (seebs) Import IPC patch from Rasmus Villemoes.
|
|
0 |
/*
|
|
1 |
* Copyright (c) 2019 Peter Seebach/Seebs <seebs@seebs.net>; see
|
|
2 |
* guts/COPYRIGHT for information.
|
|
3 |
*
|
|
4 |
* [Note: copyright added by code generator, may be
|
|
5 |
* incorrect. Remove this if you fix it.]
|
|
6 |
*
|
|
7 |
* int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags)
|
|
8 |
* int rc = -1;
|
|
9 |
*/
|
|
10 |
|
|
11 |
/* for now, let's try just failing out hard, and hope things retry with a
|
|
12 |
* different syscall.
|
|
13 |
*/
|
|
14 |
errno = ENOSYS;
|
|
15 |
rc = -1;
|
|
16 |
|
|
17 |
/* return rc;
|
|
18 |
* }
|
|
19 |
*/
|
54 | 54 |
int getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp);
|
55 | 55 |
int capset(cap_user_header_t hdrp, const cap_user_data_t datap); /* real_func=pseudo_capset */
|
56 | 56 |
long syscall(long nr, ...); /* hand_wrapped=1 */
|
|
57 |
int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags); /* flags=AT_SYMLINK_NOFOLLOW */
|