Can't read files from /proc

Alexander Fedtke ubf at gmx.net
Wed Apr 9 17:25:18 GMT 2003


Hello,

after processing all the articles from the mailing list and checking the
samba source code....

I want samba (2.2.8) to export the /proc filesystem - but exported files
seem to be empty :(

The "don't descent /proc" statement is removed from smb.conf.
Windows clients are able to list all files from /proc (a file size of 0
Bytes is shown).
Opening a file works fine but all files seems to be EMPTY :(

I did analyse and attached log.smbd: the difference between opening a
regular file and a file from /proc is: after opening and locking the
file, a regular file results in SBMreadbraw command while opening a file
from /proc results in SMBclose command (marked with '<<====')


Is there a chance to read /proc from windows clients?
What is wrong?

Can you tell me where in the source (name of function) I can fix it?

Thank you very much for any hint in advance
Alexander


Opening file /proc/uptime for reading
=====================================

[2003/04/09 17:56:38, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [proc/uptime]
[2003/04/09 17:56:38, 4] smbd/open.c:open_file_shared1(973)
  calling open_file with flags=0x0 flags2=0x0 mode=0744
[2003/04/09 17:56:38, 2] smbd/open.c:open_file(246)
  - opened file proc/uptime read=Yes write=No (numopen=3)
[2003/04/09 17:56:38, 3]
smbd/oplock_linux.c:linux_set_kernel_oplock(186)
  linux_set_kernel_oplock: got kernel oplock on file proc/uptime, dev =
2, inode = 4097, file_id = 3
[2003/04/09 17:56:38, 3] smbd/process.c:process_smb(851)
  Transaction 41 of length 45
[2003/04/09 17:56:38, 3] smbd/process.c:switch_message(687)
  switch message SMBclose (pid 238)
<<<=========
[2003/04/09 17:56:38, 4] smbd/uid.c:change_to_user(113)
  change_to_user: Skipping user change - already user
[2003/04/09 17:56:38, 3] smbd/reply.c:reply_close(3189)
  close fd=26 fnum=8544 (numopen=3)
[2003/04/09 17:56:38, 2] smbd/close.c:close_normal_file(229)
  nobody closed file proc/uptime (numopen=2) 


Opening regular file /boot.fstype for reading
=============================================

[2003/04/09 17:55:59, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [/boot.fstype]
[2003/04/09 17:55:59, 3] smbd/dosmode.c:unix_mode(111)
  unix_mode(boot.fstype) returning 0744
[2003/04/09 17:55:59, 3] lib/util.c:unix_clean_name(387)
  unix_clean_name [boot.fstype]
[2003/04/09 17:55:59, 4] smbd/open.c:open_file_shared1(973)
  calling open_file with flags=0x0 flags2=0x0 mode=0744
[2003/04/09 17:55:59, 2] smbd/open.c:open_file(246)
  - opened file boot.fstype read=Yes write=No (numopen=2)
[2003/04/09 17:55:59, 3]
smbd/oplock_linux.c:linux_set_kernel_oplock(186)
  linux_set_kernel_oplock: got kernel oplock on file boot.fstype, dev =
101, inode = 3, file_id = 2
[2003/04/09 17:55:59, 3] smbd/process.c:process_smb(851)
  Transaction 19 of length 55
[2003/04/09 17:55:59, 3] smbd/process.c:switch_message(687)
  switch message SMBreadbraw (pid 238)
<<<===========
[2003/04/09 17:55:59, 4] smbd/uid.c:change_to_user(113)
  change_to_user: Skipping user change - already user
[2003/04/09 17:55:59, 3] smbd/reply.c:reply_readbraw(2365)
  readbraw fnum=8543 start=0 max=4096 min=0 nread=4 



More information about the samba-technical mailing list