} else {
CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED=%s", env);
- snprintf(auth_info_required,
- sizeof(auth_info_required),
- "%s",
- env);
+ cmp = strcmp(env, "none");
+ if (cmp == 0) {
+ CUPS_SMB_DEBUG("Authenticate using none (anonymous) - "
+ "execute smbspool");
+ goto smbspool;
+ }
cmp = strcmp(env, "username,password");
if (cmp == 0) {
goto smbspool;
}
- /* if AUTH_INFO_REQUIRED=none */
cmp = strcmp(env, "negotiate");
if (cmp != 0) {
CUPS_SMB_ERROR("Authentication unsupported");
fprintf(stderr, "ATTR: auth-info-required=negotiate\n");
return CUPS_BACKEND_AUTH_REQUIRED;
}
+
+ snprintf(auth_info_required,
+ sizeof(auth_info_required),
+ "%s",
+ env);
}
uid = getuid();
test_smbspool_authinforequired_none()
{
- cmd='$samba_smbspool_krb5 smb://$SERVER_IP/print1 200 $USERNAME "Testprint" 1 "options" $SRCDIR/testdata/printing/example.ps 2>&1'
+ cmd='$samba_smbspool_krb5 smb://$SERVER_IP/print4 200 $USERNAME "Testprint" 1 "options" $SRCDIR/testdata/printing/example.ps 2>&1'
AUTH_INFO_REQUIRED="none"
export AUTH_INFO_REQUIRED
if [ $ret != 0 ]; then
echo "$out"
echo "failed to execute $smbspool_krb5"
- fi
-
- echo "$out" | grep 'ATTR: auth-info-required=negotiate'
- ret=$?
- if [ $ret != 0 ] ; then
- echo "$out"
return 1
fi
+
+ return 0
}
#