Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 395406 Details for
Bug 513248
net-mail/dbmail-3.1.13 - LMTP daemon fails to connect to PostgreSQL database - dbmail/lmtpd[10204]: Error:[db] db_query(+370): SQLException: ERROR: insert or update on table "dbmail_messages" violates foreign key constraint "dbmail_messages_phys
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to defer database connection until after root privileges have been dropped
server.patch (text/plain), 1.04 KB, created by
David W Noon
on 2015-02-02 19:08:35 UTC
(
hide
)
Description:
Patch to defer database connection until after root privileges have been dropped
Filename:
MIME Type:
Creator:
David W Noon
Created:
2015-02-02 19:08:35 UTC
Size:
1.04 KB
patch
obsolete
>--- src/server.c >+++ src/server.c >@@ -767,20 +767,8 @@ > > TRACE(TRACE_NOTICE, "starting main service loop for [%s]", conf->service_name); > >- server_conf = conf; >- if (db_connect()) { >- TRACE(TRACE_ERR, "could not connect to database"); >- return -1; >- } >- >- if (auth_connect()) { >- TRACE(TRACE_ERR, "could not connect to authentication"); >- return -1; >- } > srand((int) ((int) time(NULL) + (int) getpid())); > >- TRACE(TRACE_NOTICE, "starting main service loop for [%s]", conf->service_name); >- > server_conf = conf; > > evthread_use_pthreads(); >@@ -843,6 +831,18 @@ > if (drop_privileges(conf->serverUser, conf->serverGroup) < 0) > TRACE(TRACE_WARNING, "unable to drop privileges"); > >+ // We cannot usually connect to the DBMS as root, so we do it >+ // after we have dropped root privileges. >+ if (db_connect()) { >+ TRACE(TRACE_ERR, "could not connect to database"); >+ return -1; >+ } >+ >+ if (auth_connect()) { >+ TRACE(TRACE_ERR, "could not connect to authentication"); >+ return -1; >+ } >+ > server_pidfile(conf); > > if (MATCH(conf->service_name, "IMAP"))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 513248
:
378898
|
378900
|
378904
|
392812
|
395404
| 395406