diff options
Diffstat (limited to 'recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch')
-rw-r--r-- | recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch b/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch deleted file mode 100644 index 47fc88a..0000000 --- a/recipes-support/openldap/openldap-2.4.39/index-files-created-as-root.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | Document in the man page that slapindex should be run as the same user | ||
2 | as slapd, and print a warning if it's run as root (since Debian defaults | ||
3 | to running slapd as openldap). | ||
4 | |||
5 | Not suitable for upstream in this form. This patch needs to be reworked | ||
6 | to check the BerkeleyDB database ownership and only warn if running as | ||
7 | root with a database that's not owned by root. | ||
8 | |||
9 | Upstream ITS #5356 filed requesting better handling of this. Current | ||
10 | upstream discussion leans towards putting the check into the database | ||
11 | backend and aborting if slapd is run as a different user than the database | ||
12 | owner, which is an even better fix. | ||
13 | |||
14 | --- a/doc/man/man8/slapindex.8 | ||
15 | +++ b/doc/man/man8/slapindex.8 | ||
16 | @@ -148,6 +148,10 @@ | ||
17 | should not be running (at least, not in read-write | ||
18 | mode) when you do this to ensure consistency of the database. | ||
19 | .LP | ||
20 | +slapindex ought to be run as the user specified for | ||
21 | +.BR slapd (8) | ||
22 | +to ensure correct database permissions. | ||
23 | +.LP | ||
24 | This command provides ample opportunity for the user to obtain | ||
25 | and drink their favorite beverage. | ||
26 | .SH EXAMPLES | ||
27 | --- a/servers/slapd/slapindex.c | ||
28 | +++ b/servers/slapd/slapindex.c | ||
29 | @@ -34,6 +34,8 @@ | ||
30 | int | ||
31 | slapindex( int argc, char **argv ) | ||
32 | { | ||
33 | + if (geteuid() == 0) | ||
34 | + fprintf( stderr, "\nWARNING!\nRunnig as root!\nThere's a fair chance slapd will fail to start.\nCheck file permissions!\n\n"); | ||
35 | ID id; | ||
36 | int rc = EXIT_SUCCESS; | ||
37 | const char *progname = "slapindex"; | ||