trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: October 2019

Resend: Samba 4 patch for kdenetwork/tdenetwork component.

From: Andrew Randrianasulu <randrianasulu@...>
Date: Tue, 8 Oct 2019 04:44:10 +0300
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


Attachments: