Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Make the geteuid() system call overloadable using xSetSystemCall() on the unix VFSes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6c2ddea65e1871b2fcb4991c5b3e6992 |
User & Date: | drh 2015-11-24 15:06:28.338 |
Context
2015-11-24
| ||
15:12 | Fix a comment typo in the unix VFS. No changes to code. (check-in: 32e138796c user: drh tags: trunk) | |
15:06 | Make the geteuid() system call overloadable using xSetSystemCall() on the unix VFSes. (check-in: 6c2ddea65e user: drh tags: trunk) | |
03:50 | Add a test case for the fix of check-in [19d9f9ce691963310] (check-in: 19a9c07b26 user: drh tags: trunk) | |
Changes
Changes to src/os_unix.c.
︙ | |||
320 321 322 323 324 325 326 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - - - - - - - - - - - - - | ** The safest way to deal with the problem is to always use this wrapper ** which always has the same well-defined interface. */ static int posixOpen(const char *zFile, int flags, int mode){ return open(zFile, flags, mode); } |
︙ | |||
419 420 421 422 423 424 425 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + | { "pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 }, #else { "pwrite64", (sqlite3_syscall_ptr)0, 0 }, #endif #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\ aSyscall[13].pCurrent) |
︙ | |||
441 442 443 444 445 446 447 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - + + + + - + - + - + + - + - + + + + + + + + + + + + + + + | { "mkdir", (sqlite3_syscall_ptr)mkdir, 0 }, #define osMkdir ((int(*)(const char*,mode_t))aSyscall[18].pCurrent) { "rmdir", (sqlite3_syscall_ptr)rmdir, 0 }, #define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent) |
︙ | |||
4339 4340 4341 4342 4343 4344 4345 | 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 | - + | goto shm_open_err; } /* If this process is running as root, make sure that the SHM file ** is owned by the same user that owns the original database. Otherwise, ** the original owner will not be able to connect. */ |
︙ | |||
5823 5824 5825 5826 5827 5828 5829 | 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 | - + | } /* If this process is running as root and if creating a new rollback ** journal or WAL file, set the ownership of the journal or WAL to be ** the same as the original database. */ if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){ |
︙ | |||
7580 7581 7582 7583 7584 7585 7586 | 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 | - + | UNIXVFS("unix-proxy", proxyIoFinder ), #endif }; unsigned int i; /* Loop counter */ /* Double-check that the aSyscall[] array has been constructed ** correctly. See ticket [bb3a86e890c8e96ab] */ |
︙ |
Changes to test/syscall.test.
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | #------------------------------------------------------------------------- # Tests for the xNextSystemCall method. # foreach s { open close access getcwd stat fstat ftruncate fcntl read pread write pwrite fchmod fallocate pread64 pwrite64 unlink openDirectory mkdir rmdir |
︙ |