Code Monkey home page Code Monkey logo

pike's Introduction

Pike

Pike is a (nearly) pure-Python framework for writing SMB2/3 protocol correctness tests.



PyPI version Commits since Python versions License

Prerequisites

Required for basic functionality:

  • Python 2.7, 3.6+
  • PyCryptodomex

Required for building kerberos library:

  • Python development headers
  • MIT gssapi_krb5 (plus development headers)
    • Ubuntu: krb5-user, libkrb5-dev

Optional: epydoc for doc generation

Install

$ python -m pip install pike-smb2

Build instructions

Ubuntu 14.04 / 16.04

apt-get install -y --no-install-recommends krb5-user libkrb5-dev python-dev build-essential python2.7 python-pip
pip install setuptools pycryptodomex
python setup.py install

Running tests

The tests in the test subdirectory are ordinary Python unittest tests and can be run as usual. The following environment variables are used by the tests:

PIKE_SERVER=<host name or address>
PIKE_SHARE=<share name>
PIKE_CREDS=DOMAIN\User%Passwd
PIKE_LOGLEVEL=info|warning|error|critical|debug
PIKE_SIGN=yes|no
PIKE_ENCRYPT=yes|no
PIKE_MAX_DIALECT=DIALECT_SMBX_Y_Z
PIKE_MIN_DIALECT=DIALECT_SMBX_Y_Z
PIKE_TRACE=yes|no

If PIKE_TRACE is set to yes then incoming/outgoing packets will be logged at the debug level.

$ python -m unittest discover -s pike/test -p *.py

Alternatively, to build and run all tests

$ python setup.py test

To run an individual test file

$ python -m unittest discover -s pike/test -p echo.py

To run an individual test case

$ python -m unittest pike.test.echo.EchoTest.test_echo

Kerberos Hints

Setting up MIT Kerberos as provided by many Linux distributions to interoperate with an existing Active Directory and Pike is relatively simple.

If PIKE_CREDS is not specified and the kerberos module was built while installing pike then your current Kerberos credentials will be used to authenticate.

Use a minimal /etc/krb5.conf on the client such as the following

[libdefaults]
    default_realm = AD.EXAMPLE.COM

Retrieve a ticket for the desired user

$ kinit user_1

(Optional) in leiu of DNS, add host entries for the server name + domain

$ echo "10.1.1.150    smb-server.ad.example.com" >> /etc/hosts

Run pike tests

$ PIKE_SERVER="smb-server.ad.example.com" PIKE_SHARE="C$" python -m unittest discover -s pike/test -p tree.py

Note that you will probably need to specify the server by fully-qualified hostname in order for Kerberos to figure out which ticket to use. If you get errors during session setup when using an IP address, this is probably the reason.

Decoding BufferOverrun

When pike encounters a buffer or boundary problem, BufferOverrun is raised with the full packet bytes. This can be used in two ways.

With Pike

For some problems, it may be necessary to run pike with a debugger while decoding the packet bytes to reproduce runtime parsing or decoding issues.

from binascii import unhexlify
import array
import pike.netbios

buf = array.array("B", unhexlify(b'00000114fe534d4240000000000000000000040001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000100110302008a8c2a17f5f24e5eb278dd8aaa90d42e1e0000000000010000001000000010006c52c4c7e53dd60166157c68c63dd60180005500d8000000605306062b0601050502a0493047a019301706092a864886f712010202060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c656173655f69676e6f72650000000100260000000000010020000100c93dfb463f3e99ed9030a66d28548c330a4ae9a65856237d00e61f68c14eb09f0000020004000000000001000200'))
nb = pike.netbios.Netbios()
nb.parse(buf)

With Wireshark

Other decoding problems may be easier to understand by looking at the packet with a pcap analysis tool.

$ echo '00000114fe534d4240000000000000000000040001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000100110302008a8c2a17f5f24e5eb278dd8aaa90d42e1e00000000000100000010000000100050cff0c2e43dd60166157c68c63dd60180005500d8000000605306062b0601050502a0493047a019301706092a864886f712010202060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c656173655f69676e6f7265000000010026000000000001002000010017af98eb38fdcd3db91bdca1303e9c72ef37b7e572abf897e47bd779aaa641d90000020004000000000001000200' \
  | xxd -r -p - \
  | od -Ax -tx1 -v \
  | text2pcap -i46 -T 445,445 - - \
  | tshark -P -V -r -
  • xxd decodes the ascii hex bytestream output from the BufferOverrun exception into binary
  • od dumps the output to a format wireshark can read
  • text2pcap (wireshark) appends fake ethernet and IP headers to the SMB packet and writes a pcap file to stdout
  • tshark (wireshark) decodes the SMB packet and displays full packet details

License

This project, pike and pike-smb2, is released under a Simplified BSD License granted by Dell Inc.'s Open Source Project program, except code under pykerb/ which is released under an Apache 2.0 License granted by Apple Inc.
All project contributions are entirely reflective of the respective author(s) and not of Dell Inc. or Apple Inc.

See file LICENSE for licensing information.

Other

There is older API documentation from epydoc.

pike's People

Contributors

calsoft-cifs-team avatar dhanashreep avatar isi-adas avatar isi-bkoropoff avatar isi-mfurer avatar isi-pandrew avatar isi-rszczesniak avatar jtmoon79 avatar leiwenfeng avatar lingarajg avatar masenf avatar ngie-eign avatar prayasgupta avatar sagarnaik avatar sleef54 avatar sudosantanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pike's Issues

Pike does not build on OS X

A few issues need to be ironed out to allow Pike (in particular, pykerb) to build on OS X.
There should also be some explicit guidance on how to get it to build on this platform since OS X ships with downlevel versions of Python and MIT krb5 as of 10.8.

Create a Lock class in pike

Locking in pike is kinda bit awkward. The lock class can be returned as part of channel.lock() and then can be used as a context manager for unlocking or may be by calling Lock.unlock().

kerberos.so is not generated by setup.py

When installing from source, kerberos.so is not generated by python setup.py install is ran. This was replicated with 0.3.18, .17, .11 and .0 zip files also latest on master branch.

Dockerfile of Ubuntu18 container I attempted this in:

FROM ubuntu:18.04
RUN apt-get -y update && apt-get -y install sudo net-tools curl unzip
RUN apt-get install -y --no-install-recommends python-dev build-essential python2.7 python3 python-pip py3c-dev python3-pip
RUN apt-get install -y python3-dev
RUN apt-get install -y --no-install-recommends libkrb5-dev
RUN pip3 install setuptools
RUN pip3 install pycryptodomex
RUN apt-get -y install silversearcher-ag git
RUN git clone https://github.com/emc-isilon/pike.git
WORKDIR pike
RUN python3 setup.py install
RUN ls; sleep 10
WORKDIR /pike/build/temp.linux-aarch64-3.6/pykerb
RUN ag -g kerberos.so; sleep 10
RUN ls; ls -l; sleep 10
WORKDIR /pike
RUN ag -g kerberos.so; sleep 10

Docs: review and refresh generated documentation

The generated documentation is from 2017 and covers up to version 0.2.11.

Enough has changed since then that regenerating the documentation is crucial, however the current docs don't really have a friendly introduction or layout for new comers.

Need at least a section on "getting started", "overview of the structure", "landing page for the SMB API (model)", and "internals".

GSSError: (('An unsupported mechanism was requested', 65536), ('Unknown error', 0))

Downloaded the latest pike on my CentOS client and configured and build pike per guidelines. Executed pike both using NTLM and Kerberos auth, but failing with below error:
GSSError: (('An unsupported mechanism was requested', 65536), ('Unknown error', 0))

Here is a snippet of the screen output:

make test SERVER=x.x.x.x. SHARE=XXXX CREDS=<domain_name>\administrator%

test_change_notify_file_name (changenotify.ChangeNotifyTest) ... ERROR
test_create_close (compound.CompoundTest) ... ERROR
test_copy_big_file (copychunk.TestServerSideCopy) ... ERROR
test_copy_max_chunks (copychunk.TestServerSideCopy) ... ERROR
test_copy_multiple_chunks (copychunk.TestServerSideCopy) ... ERROR
test_copy_small_file (copychunk.TestServerSideCopy) ... ERROR
test_neg_dst_exc_brl (copychunk.TestServerSideCopy) ... ERROR
test_neg_dst_is_a_dir (copychunk.TestServerSideCopy) ... ERROR
test_neg_dst_no_read (copychunk.TestServerSideCopy) ... ERROR
test_neg_dst_no_write (copychunk.TestServerSideCopy) ... ERROR
test_neg_src_exc_brl (copychunk.TestServerSideCopy) ... ERROR
test_neg_src_no_read (copychunk.TestServerSideCopy) ... ERROR
test_offset_copy_big_file (copychunk.TestServerSideCopy) ... ERROR
test_offset_copy_multiple_chunks (copychunk.TestServerSideCopy) ... ERROR
test_offset_copy_small_file (copychunk.TestServerSideCopy) ... ERROR
test_overlap_15_chunks_4096_overlap (copychunk.TestServerSideCopy) ... ERROR
test_overlap_16_chunks_1024_overlap (copychunk.TestServerSideCopy) ... ERROR
test_overlap_multiple_chunks (copychunk.TestServerSideCopy) ... ERROR
test_same_big_file (copychunk.TestServerSideCopy) ... ERROR
test_same_multiple_chunks (copychunk.TestServerSideCopy) ... ERROR
test_same_offset_big_file (copychunk.TestServerSideCopy) ... ERROR
test_same_offset_multiple_chunks (copychunk.TestServerSideCopy) ... ERROR
test_same_offset_small_file (copychunk.TestServerSideCopy) ... ERROR
test_same_small_file (copychunk.TestServerSideCopy) ... ERROR
test_durable (durable.DurableHandleTest) ... ERROR
test_durable_invalidate (durable.DurableHandleTest) ... ERROR
test_durable_reconnect (durable.DurableHandleTest) ... ERROR
test_durable_reconnect_fails_client_guid (durable.DurableHandleTest) ... ERROR
test_durable_reconnect_v2 (durable.DurableHandleTest) ... ERROR
test_durable_reconnect_v2_fails_client_guid (durable.DurableHandleTest) ... ERROR
test_durable_v2 (durable.DurableHandleTest) ... ERROR
test_durable_v2_invalidate (durable.DurableHandleTest) ... ERROR
test_echo (echo.EchoTest) ... ERROR
test_validate_negotiate_smb3 (ioctl.ValidateNegotiateInfo) ... ERROR
test_lease_break_close_ack (lease.LeaseTest) ... ERROR
test_lease_multiple_connections (lease.LeaseTest) ... ERROR
test_lease_upgrade_break (lease.LeaseTest) ... ERROR
test_allow_zero_byte_write (lock.LockTest) ... ERROR
test_cancel (lock.LockTest) ... ERROR
test_deny_write (lock.LockTest) ... ERROR
test_lock (lock.LockTest) ... ERROR
test_open_bind_close (multichannel.MultiChannelTest) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_MULTI_CHANNEL '
test_write_fence_reject_stale (multichannel.MultiChannelTest) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_MULTI_CHANNEL '
test_downlevel (negotiate.CapMultichannel) ... ERROR
test_downlevel_no_advert (negotiate.CapMultichannel) ... ERROR
test_smb3 (negotiate.CapMultichannel) ... ERROR
test_smb3_many_capabilities (negotiate.CapMultichannel) ... ERROR
test_smb3_no_advert (negotiate.CapMultichannel) ... ERROR
test_downlevel (negotiate.CapMulticredit) ... ERROR
test_smb21 (negotiate.CapMulticredit) ... ERROR
test_smb3 (negotiate.CapMulticredit) ... ERROR
test_smb3_many_capabilities (negotiate.CapMulticredit) ... ERROR
test_downlevel (negotiate.CapPersistent) ... ERROR
test_downlevel_no_advert (negotiate.CapPersistent) ... ERROR
test_smb3 (negotiate.CapPersistent) ... ERROR
test_smb3_many_capabilities (negotiate.CapPersistent) ... ERROR
test_smb3_no_advert (negotiate.CapPersistent) ... ERROR
test_oplock_break (oplock.OplockTest) ... ERROR
test_create (persistent.Persistent) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '
test_open_while_disconnected (persistent.Persistent) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '
test_reconnect (persistent.Persistent) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '
test_mismatch_0_file_alignment_info (query.QueryTest) ... ERROR
test_mismatch_0_file_all_info (query.QueryTest) ... ERROR
test_mismatch_0_file_basic_info (query.QueryTest) ... ERROR
test_mismatch_0_file_ea_info (query.QueryTest) ... ERROR
test_mismatch_0_file_internal_info (query.QueryTest) ... ERROR
test_mismatch_0_file_mode_info (query.QueryTest) ... ERROR
test_mismatch_0_file_position_info (query.QueryTest) ... ERROR
test_mismatch_0_file_standard_info (query.QueryTest) ... ERROR
test_query_file_alignment_info (query.QueryTest) ... ERROR
test_query_file_all_info (query.QueryTest) ... ERROR
test_query_file_basic_info (query.QueryTest) ... ERROR
test_query_file_ea_info (query.QueryTest) ... ERROR
test_query_file_internal_info (query.QueryTest) ... ERROR
test_query_file_mode_info (query.QueryTest) ... ERROR
test_query_file_position_info (query.QueryTest) ... ERROR
test_query_file_standard_info (query.QueryTest) ... ERROR
test_query_sec_desc_0 (query.QueryTest) ... ERROR
test_file_directory_info (querydirectory.QueryDirectoryTest) ... ERROR
test_specific_name (querydirectory.QueryDirectoryTest) ... ERROR
test_qfid_diff_file (queryondiskid.TestQueryOnDiskID) ... ERROR
test_qfid_functional (queryondiskid.TestQueryOnDiskID) ... ERROR
test_qfid_same_file (queryondiskid.TestQueryOnDiskID) ... ERROR
test_qfid_same_file_seq (queryondiskid.TestQueryOnDiskID) ... ERROR
test_qfid_same_file_seq_delete (queryondiskid.TestQueryOnDiskID) ... ERROR
test_write (readwrite.ReadWriteTest) ... ERROR
test_write_none (readwrite.ReadWriteTest) ... ERROR
test_write_none_access (readwrite.ReadWriteTest) ... ERROR
test_write_none_lease (readwrite.ReadWriteTest) ... ERROR
test_write_none_oplock (readwrite.ReadWriteTest) ... ERROR
test_set_get_reparse_point (reparse.TestReparsePoint) ... ERROR
test_symbolic_link_error_response (reparse.TestReparsePoint) ... ERROR
test_session_logoff (session.SessionTest) ... ERROR
test_set_file_basic_info (set.SetTest) ... ERROR
test_set_file_mode_info (set.SetTest) ... ERROR
test_set_file_name (set.SetTest) ... ERROR
test_set_file_position_info (set.SetTest) ... ERROR
test_tree (tree.TreeTest) ... ERROR
test_appinstanceid (appinstanceid.AppInstanceIdTest) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '
test_appinstanceid_persistent_with_disconnect (appinstanceid.AppInstanceIdTest) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '
test_appinstanceid_reconnect_same_clientguid (appinstanceid.AppInstanceIdTest) ... skipped 'Capabilities missing: SMB2_GLOBAL_CAP_PERSISTENT_HANDLES '

ERROR: test_change_notify_file_name (changenotify.ChangeNotifyTest)

Traceback (most recent call last):
File "/home/pike-master/test/changenotify.py", line 44, in test_change_notify_file_name
chan, tree = self.tree_connect()
File "/home/output/stage/usr/lib64/python2.7/site-packages/pike/test.py", line 127, in tree_connect
chan = conn.session_setup(self.creds)
File "/home/output/stage/usr/lib64/python2.7/site-packages/pike/model.py", line 709, in session_setup
domain=domain)
GSSError: (('An unsupported mechanism was requested', 65536), ('Unknown error', 0))

Thanks in advance for any help here.

Regards
Santosh

Pike doesn't sign SMB2_CANCEL request

model.py

1207         # Don't bother trying to sign cancel
1208         smb_req.flags &= ~smb2.SMB2_FLAGS_SIGNED

Windows Server 2016 returns STATUS_ACCESS_DENIED when this unsigned cancel request comes in on a channel that has negotiated signing required

Refactor connection and transport

Separate and untangle pike's Client, Connection, Transport and BasePoller objects to more closely match python 3's asyncio module.

teardown traceback on some connections

masen@mf-mbp12-wifi pike % ./.tox/py310/bin/python
Python 3.10.8 (main, Oct 13 2022, 10:19:13) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pike import TreeConnect, smb2
>>> tc = TreeConnect(server="localhost", creds="testuser%123Abc", share="share")
>>> tc()
TreeConnect(_client=None, server='localhost', port=445, creds='testuser%123Abc', share='share', resume=None, signing=False, encryption=False, require_dialect=None, require_capabilities=None, require_share_capabilities=None, conn=<pike.model.Connection object at 0x10c539720>, chan=<pike.model.Channel object at 0x10cceac50>, tree=<pike.model.Tree object at 0x10cd000d0>)
>>> 
Exception ignored in: <function TreeConnect.__del__ at 0x10ccbc8b0>
Traceback (most recent call last):
  File "/Users/masen/code/pike/pike/test/__init__.py", line 416, in __del__
  File "/Users/masen/code/pike/pike/test/__init__.py", line 375, in close
  File "/Users/masen/code/pike/pike/model.py", line 1394, in tree_disconnect
  File "/Users/masen/code/pike/pike/model.py", line 973, in transceive
  File "/Users/masen/code/pike/pike/model.py", line 973, in <listcomp>
  File "/Users/masen/code/pike/pike/model.py", line 238, in result
  File "/Users/masen/code/pike/.tox/py310/lib/python3.10/site-packages/future/utils/__init__.py", line 441, in raise_
  File "/Users/masen/code/pike/pike/model.py", line 816, in _prepare_outgoing
  File "/Users/masen/code/pike/pike/core.py", line 562, in serialize
  File "/Users/masen/code/pike/pike/core.py", line 551, in encode
  File "/Users/masen/code/pike/pike/netbios.py", line 57, in _encode
  File "/Users/masen/code/pike/pike/core.py", line 551, in encode
  File "/Users/masen/code/pike/pike/smb2.py", line 228, in _encode
  File "/Users/masen/code/pike/pike/digest.py", line 49, in aes128_cmac
  File "/Users/masen/code/pike/.tox/py310/lib/python3.10/site-packages/Cryptodome/Cipher/AES.py", line 232, in new
KeyError: 'Cryptodome.Cipher.AES'

likely introduced with #72, more investigation needed before release 0.4.0

pike with python multiprocessing fails with "OSError: [Errno 9] Bad file descriptor"

Hi,

i could see the pike is not working when i use it with python multiprocessing module.

i am using pike version '0.2.7'

my requirements is to create multiple process to establish the connection and send smb requests to my server.

following are my observations:
1. Without multiprocessing:
`

import pike.model
import multiprocessing

def test():
... client = pike.model.Client()
... connection = client.connect("127.0.0.1", 445).negotiate()
... channel = connection.session_setup("ISI\root%a")
... tree = channel.tree_connect("TestShare")
... print("IT WORKED...")
...

test()
IT WORKED...

`

2. with multiprocessing:
`

class Test(multiprocessing.Process):
... def init(self):
... multiprocessing.Process.init(self)
...
... def run(self):
... client = pike.model.Client()
... connection = client.connect("127.0.0.1", 445).negotiate()
... channel = connection.session_setup("**********") # intentionaly putting * here :-)
... tree = channel.tree_connect("TestShare")
...

Test().start()

ERROR OUTPUT HERE:

Process Test-34:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
File "", line 7, in run
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 327, in connect
return self.connect_submit(server, port).result()
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 339, in connect_submit
return Connection(self, server, port).connection_future
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 499, in init
self.create_socket(family, socktype)
File "/var/crash/tools/lib/python2.7/site-packages/pike/transport.py", line 74, in create_socket
self.set_socket(sock)
File "/var/crash/tools/lib/python2.7/site-packages/pike/transport.py", line 83, in set_socket
self.poller.add_channel(self)
File "/var/crash/tools/lib/python2.7/site-packages/pike/transport.py", line 349, in add_channel
self.kq.control(events, 0)
OSError: [Errno 9] Bad file descriptor

`

could any please take a look and let me know what is the wrong in it.

Docs: need usage example in README.md

  1. using Pike in interactive Python
  2. using Pike like an SMB client
  3. using Pike to write unittests
  4. using Pike with pytest

The existing tests under pike.test aren't necessarily the best examples and we don't really want people copying the bad patterns.

Would be good to have some python3, pytest, pike.test.TreeConnect examples in place showing the most common API calls and linking into the generated documentation for full details.

add coverage

There is github-handled self-testing already in place. A little bit more work to add a coverage report using some coverage service. That can be fed back into a coverage badge with a percent indicator.

Unable to create multiple sessions from a single connection

import pike.model
conn = pike.model.Client().connect('127.0.0.1').negotiate()
conn.session_setup('admin%a')
<pike.model.Channel object at 0x80aac79a0>
conn.session_setup('root%a')
Traceback (most recent call last):
File "", line 1, in
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 1107, in session_setup
return session_context.submit().result()
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 1073, in _process
self.session_future(self._finish(smb_res))
File "/var/crash/tools/lib/python2.7/site-packages/pike/model.py", line 1018, in _finish
smb_res.verify(self.conn.signing_digest(), signing_key)
File "/var/crash/tools/lib/python2.7/site-packages/pike/smb2.py", line 304, in verify
raise core.BadPacket()
pike.core.BadPacket

Not able to run pike successfully on a cifs/smb share

Hi,

I trying to run pike on a fedora 19 host. As per the readme file I have below packages present in fedora 19 to compile pike

rpm -qa | grep 'python|krb|pycrypto'
python-libs-2.7.5-4.fc19.x86_64
krb5-devel-1.11.3-2.fc19.x86_64
python-devel-2.7.5-4.fc19.x86_64
dbus-python-1.1.1-5.fc19.x86_64
krb5-workstation-1.11.3-2.fc19.x86_64
python-pycurl-7.19.0-15.1.fc19.x86_64
newt-python-0.52.15-1.fc19.x86_64
python-slip-0.4.0-1.fc19.noarch
python-2.7.5-4.fc19.x86_64
rpm-python-4.11.1-3.fc19.x86_64
python-decorator-3.4.0-2.fc19.noarch
python-crypto-2.6-5.fc19.x86_64
python-urlgrabber-3.9.1-27.fc19.noarch
python-iniparse-0.4-7.fc19.noarch
libselinux-python-2.1.13-15.fc19.x86_64
python-slip-dbus-0.4.0-1.fc19.noarch
krb5-libs-1.11.3-2.fc19.x86_64

  • Below steps to compile worked fine for me

    cd pike
    mkdir output && cd output
    ../configure
    make
    ls
    make install

  • In order to run pike , below env setup is done

    PIKE_SERVER=10...**
    PIKE_SHARE=gluster-dis-rep3
    PIKE_LOGLEVEL=debug

  • kerberos tgt is available for the Active directory domain. I am trying to run pike on one of the windows share of the domain

klist

Ticket cache: DIR::/run/user/0/krb5cc/tkt8De5sO
Default principal: [email protected]

Valid starting Expires Service principal
09/25/2013 14:13:46 09/26/2013 00:13:46 krbtgt/[email protected]
renew until 10/02/2013 14:13:39

  • Now I am not sure how to run the tests? kindly let me know.

If I run the tests during compilation i.e. "make test SERVER= SHARE=" I get below results


ERROR: test_echo (echo.EchoTest)

Traceback (most recent call last):
File "/root/pike/test/echo.py", line 45, in test_echo
chan, tree = self.tree_connect()
File "/root/pike/output/stage/usr/lib64/python2.7/site-packages/pike/test.py", line 127, in tree_connect
chan = conn.session_setup(self.creds)
File "/root/pike/output/stage/usr/lib64/python2.7/site-packages/pike/model.py", line 725, in session_setup
smb_res = self.transceive(smb_req.parent)[0]
File "/root/pike/output/stage/usr/lib64/python2.7/site-packages/pike/model.py", line 654, in transceive
return map(Future.result, self.submit(req))
File "/root/pike/output/stage/usr/lib64/python2.7/site-packages/pike/model.py", line 179, in result
raise self.response, None, traceback
ResponseError: (SMB2_SESSION_SETUP, STATUS_INVALID_PARAMETER)


Ran 62 tests in 251.343s

FAILED (errors=35, skipped=24)
[test] FAILED: 'env' 'PYTHONPATH=stage/usr/lib64/python2.7/site-packages' 'PIKE_SERVER=10.16.159.136' 'PIKE_CREDS=' 'PIKE_SHARE=gluster-dis-rep3' 'PIKE_TRACE=' 'PIKE_LOGLEVEL=' '/usr/bin/python' '-B' '-m' 'unittest' 'discover' '-v' '-s' '../test' '-p' '.py'
make: *
* [test] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.