FreeBSD Bugzilla – Attachment 153991 Details for
Bug 198409
net/minidlna 1.1.4_1,1 "upnphttp.c:1909 Error opening ..." at boot and no error after "restart"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
pach to read files UID and GID from inside the program
patch-debug_fork-upnphttp (text/plain), 1.70 KB, created by
olivier
on 2015-03-08 08:59:54 UTC
(
hide
)
Description:
pach to read files UID and GID from inside the program
Filename:
MIME Type:
Creator:
olivier
Created:
2015-03-08 08:59:54 UTC
Size:
1.70 KB
patch
obsolete
>--- upnphttp.c.orig 2014-08-26 23:09:22.000000000 +0200 >+++ upnphttp.c 2015-03-07 19:27:16.000000000 +0100 >@@ -1903,10 +1903,38 @@ > } > } > >+ /* Perform several checks to pin down the file access problem */ >+ >+ /*sleep (15); */ >+ >+ DPRINTF(E_ERROR, L_HTTP, "Starting debug on file %s ----------------\n", last_file.path); >+ >+ DPRINTF(E_ERROR, L_HTTP, "Real UID of the process %i\n", getuid()); >+ DPRINTF(E_ERROR, L_HTTP, "Real GID of the process %i\n", getgid()); >+ DPRINTF(E_ERROR, L_HTTP, "Effective UID of the process %i\n", geteuid()); >+ DPRINTF(E_ERROR, L_HTTP, "Effective GID of the process %i\n", getegid()); >+ >+ struct stat file_attr; >+ int stat_res; >+ stat_res = stat(last_file.path,&file_attr); >+ >+ DPRINTF(E_ERROR, L_HTTP, "Mode of file %hu\n", file_attr.st_mode ); >+ DPRINTF(E_ERROR, L_HTTP, "UID of file %u\n", file_attr.st_uid ); >+ DPRINTF(E_ERROR, L_HTTP, "GID of file %u\n", file_attr.st_gid ); >+ >+ int access_r,access_w,access_x; >+ access_r = access( last_file.path, R_OK ); >+ access_w = access( last_file.path, W_OK ); >+ access_x = access( last_file.path, X_OK ); >+ if( access_r == -1 ) {DPRINTF(E_ERROR, L_HTTP, "Error opening for READ %s [%s]\n", last_file.path, strerror( errno ));} >+ if( access_w == -1 ) {DPRINTF(E_ERROR, L_HTTP, "Error opening for WRITE %s [%s]\n", last_file.path, strerror( errno ));} >+ if( access_x == -1 ) {DPRINTF(E_ERROR, L_HTTP, "Error opening for EXEC %s [%s]\n", last_file.path, strerror( errno ));} >+ >+ > offset = h->req_RangeStart; > sendfh = open(last_file.path, O_RDONLY); > if( sendfh < 0 ) { >- DPRINTF(E_ERROR, L_HTTP, "Error opening %s\n", last_file.path); >+ DPRINTF(E_ERROR, L_HTTP, "Error opening %s [%s]\n", last_file.path, strerror( errno )); > Send404(h); > goto error; > }
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 198409
: 153991 |
153992