Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Allow paths to reconstruct and quota to be configurable somehow #2386

Open
jasontibbitts opened this issue Jun 1, 2018 · 2 comments
Open
Labels
3.1 affects 3.1 dev releases 3.3 affects 3.3 dev releases

Comments

@jasontibbitts
Copy link

jasontibbitts commented Jun 1, 2018

While tracking down why a Cassandane test that calls the IMAP RECONSTRUCT command fails, I found that two executables called by imapd are hardcoded to be found in SBIN_DIR and nowhere else: reconstruct and quota. There's a third instance where ctl_deliver -E is implemented to print a warning and call SBIN_DIRT/cyr_expire, but I doubt that's a real problem and it can probably be removed at some point anyway.

One problem with hardcoding the paths to reconstruct and quota is is that you can't completely run an imapd instance outside of the location it was compiled to run in. Which obviously isn't a huge deal, but does prevent certain types of testing like the the Fedora package does (where it's compiled to live in the usual system location but gets installed with make install DESTDIR=random_path and then tested from there). Basically all of Cassandane works fine this way with an appropriate configuration, except for one test that calls reconstruct.

Also, looking at this made me realize that Fedora renames quota to cyr_quota but doesn't patch the call to it. I'll have to fix that. Being able to test it via Cassandane would have revealed that problem a long time ago.

@elliefm elliefm added the 3.1 affects 3.1 dev releases label Jun 4, 2018
@elliefm
Copy link
Contributor

elliefm commented Jun 4, 2018

Oh heh, reading my notifications in chronological order. FTR here's my comment from #2047:

Oooh that's a curly one

We can't detect a destdir setting at compile time, because it's an install-time override. The "compile it as if it will be installed in /prefix, but actually install it to /destdir/prefix" behaviour is literally the whole point! I imagine it would do the right thing if it was running chroot'd to /destdir, but that's a whole nother can of worms

Off the top of my head, I think the way to handle this would probably be to add optional imapd.conf settings to override the locations exec'd by imapd. Ideally this would take the form of auditing all the things that get exec'd and doing something for all of them (vs tackling them piecemeal and winding up with a mess). There'd be security aspects to take into consideration as well, I guess

@jasontibbitts
Copy link
Author

Yep, just an option to set a path (which defaults to SBIN_DIR) where these executables live would do it. I don't think they need to be individually configurable.

@elliefm elliefm added the 3.3 affects 3.3 dev releases label Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.1 affects 3.1 dev releases 3.3 affects 3.3 dev releases
Projects
None yet
Development

No branches or pull requests

2 participants