Resend: Samba 4 patch for kdenetwork/tdenetwork component.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I was trying to build my own KDE3-based LiveCD (based on Slackware 14.1!). 
While most things worked - samba configuration using KDE's own config module from kcontrol
showed mostly greyed-out fields.

Aw ....

I looked at 
http://mirror.git.trinitydesktop.org/cgit/tdenetwork/tree/filesharing/advanced/kcm_sambaconf/sambafile.cpp

and tadam!

=========

int SambaFile::getSambaVersion() {
  if (_sambaVersion > -1)
    return _sambaVersion;
    
  TDEProcess testParam;
  testParam << "testparm";
  testParam << "-V";
  _parmOutput = TQString("");
  _sambaVersion = 2;
      
  connect( &testParam, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
          this, TQT_SLOT(testParmStdOutReceived(TDEProcess*,char*,int)));

          
          
  if (testParam.start(TDEProcess::Block,TDEProcess::Stdout)) {
    if (_parmOutput.find("3") > -1)
      _sambaVersion = 3;
  } 

  kdDebug(5009) << "Samba version = " << _sambaVersion << endl;
    
  return _sambaVersion;
}
============

and next it checks this version ...

So, I added similar block testing for samba 4 (Slackware 14.1 uses 4.6.16)

See patch (attached). While this one is for KDE's kdenetwork-3.5.10 - I think this 
fix should be applicable to TDE's tdenetwork.

Of course this is not everything - Samba log files for example moved and apparently changed format.

And smbpasswd command stores Samba users by default in new format, not readable by old loader
But there is workaround!
Just reverse this command:

http://www.novell.com/linux/releasenotes/i386/openSUSE/11.1.42/RELEASE-NOTES.en.html

pdbedit -i smbpasswd:/etc/samba/smbpasswd -e tdbsam:/etc/samba/passdb.tdb

I actually used /etc/samba/private patch for Slackware 14.1, but for 14.2 path is different!

smb passwd file = /var/lib/samba/private/smbpasswd
as reported (among many different things) by "testparm -v"

At least file sharing started to work - I can share folder, and set it writable.
But broswing in KDE3's actually require full smb://host/Share_Name form,
otherwise it shows nothing (at least in qemu, may be built-in smb server 
interferes with normal OS-level samba server?).

ISO file for testing (700Mb!)
https://yadi.sk/d/HYZ9rwcykB3Fzg

sha256sum CDROM-4.4.194_5.iso
0f49ddf10089de2e802825ea03b994644c9253e7330daacccb6258a18b180d1b  CDROM-4.4.194_5.iso

password for root user: toor
for guest: guest

[those actually defaults from old Slax 6.x line of live CD]

You can type "slax autoexec=kdm" at isolinux boot prompt - then it will load X/kdm by default.

Sources (for components I modified) in root/src

qemu command line:
 qemu-system-i386 -cdrom /dev/shm/CDROM-4.4.194_5.iso -m 1.9G -enable-kvm -soundhw es1370 -smp 2 -display sdl,gl=on -usb -cpu host

but you can simplify it down to
qemu-system-i386 -cdrom /dev/shm/CDROM-4.4.194_5.iso -m 512 -enable-kvm

--- filesharing/advanced/kcm_sambaconf/sambafile.cpp.orig	2019-10-07 21:43:41.216000000 +0000
+++ filesharing/advanced/kcm_sambaconf/sambafile.cpp	2019-10-07 21:47:35.336000000 +0000
@@ -356,6 +356,12 @@
     if (_parmOutput.find("3") > -1)
       _sambaVersion = 3;
   } 
+  
+  if (testParam.start(KProcess::Block,KProcess::Stdout)) {
+    if (_parmOutput.find("4") > -1)
+      _sambaVersion = 4;
+  } 
+  
 
   kdDebug(5009) << "Samba version = " << _sambaVersion << endl;
     
@@ -373,7 +379,7 @@
   testParam << "testparm";
   testParam << "-s"; 
   
-  if (getSambaVersion() == 3)
+  if ((getSambaVersion() == 3) || (getSambaVersion() == 4))
      testParam << "-v";
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: trinity-devel-unsubscribe@xxxxxxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: trinity-devel-help@xxxxxxxxxxxxxxxxxxxxxxxxxx
Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/
Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting

[Index of Archives]     [Trinity Users]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [KDE]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux