Convert the db access check into using *at function and filedescriptors
modified libpkg/pkgdb.c
@@ -748,7 +748,7 @@ pkgdb_init(sqlite3 *sdb)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -756,6 +756,9 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_user)
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -764,7 +767,7 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_user)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -810,19 +813,18 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_user)
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -832,29 +834,47 @@ pkgdb_check_access(unsigned mode, const char* dbdir, const char *dbname)
|
|
|
|
|
|
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -867,7 +887,6 @@ pkgdb_check_access(unsigned mode, const char* dbdir, const char *dbname)
|
|
|
|
|
|
| - | |
|
|
|
|
|