SASL
I configured Kerberos on Ubuntu 24.04 WSL and was able to run the following command:
export KRB5_TRACE=/dev/stderr
ldapsearch -H ldap://myserver.my.local -Y GSSAPI
that produced the following output:
(more…)I configured Kerberos on Ubuntu 24.04 WSL and was able to run the following command:
export KRB5_TRACE=/dev/stderr
ldapsearch -H ldap://myserver.my.local -Y GSSAPI
that produced the following output:
(more…)C# code:
public void bindWithMs(string ldapServer, int ldapPort, string ldapUser, string ldapPassword)
{
var ldap = new System.DirectoryServices.Protocols.LdapDirectoryIdentifier(ldapServer, ldapPort);
using (var connection = new System.DirectoryServices.Protocols.LdapConnection(ldap))
{
connection.AuthType = System.DirectoryServices.Protocols.AuthType.Negotiate;
connection.Timeout = TimeSpan.FromSeconds(120);
connection.SessionOptions.ProtocolVersion = 3;
connection.SessionOptions.Signing = true;
connection.SessionOptions.Sealing = true;
connection.Credential = new System.Net.NetworkCredential(ldapUser, ldapPassword);
connection.Bind();
}
}
I updated my Ubuntu 24.04 and my WordPress stopped loading images of size 1.3MB and higher.
I fixed this by adding the following:
client_max_body_size 32M;
to Nginx configuration.
(more…)
class Example
{
public:
Example()
{
m.emplace("abc", 13);
}
const int& findValue(const std::string& val) const
{
auto i = m.find(val);
if (i == m.end()) {
throw std::runtime_error(std::format("Key {} not found.", val));
}
return i->second;
}
int& findValue(const std::string& val)
{
return const_cast<int&>(
const_cast<const Example*>(this)->findValue(val));
}
#include <iostream>
#include <memory>
#include <string>
#include <vector>
struct IObject {
virtual ~IObject() = default;
/// Returns the name of the object.
virtual std::string getName() const = 0;
/// Prints a textual description of the object.
virtual void describe() const = 0;
/// Eats another object.
virtual bool eat(IObject* other) = 0;
};
QT implies that the client code will do qobject_cast that is actually dynamic_cast:
awl::ProcessTask<void> MarketModel::coPlaceOrder(OrderPtr p)
{
// Update SQLite databse...
// ...
// QT signals are used in both C++ and QML.
// They works with QObject*, and they are not aware of concrete types.
QObject::connect(p.get(), &OrderModel::statusChanged, this, &MarketModel::onOrderStatusChanged);
}
Compiles without warnings with MSVC:
class A
{
public:
void f(const int a);
};
void A::f(int a)
{
a = 10;
std::cout << a;
}
sudo apt install tcpdump
sudo tcpdump -i any -w ldaps.pcap 'tcp port 636' &
export SSLKEYLOGFILE=/home/dmitriano/dev/work/sslkeys.log
ldapsearch -H ldaps://$localhost:636 -x -D $ad_user -w $ad_password -b "DC=my,DC=local"
ll
-rw-r--r-- 1 tcpdump tcpdump 246320 Oct 14 13:50 ldaps.pcap
-rw-r--r-- 1 dmitriano dmitriano 176 Oct 14 13:47 sslkeys.log
I set Verbose level:
(Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics")."16 LDAP Interface Events"
0
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics" -Name "16 LDAP Interface Events" -Value 5