kopia lustrzana https://github.com/Hamlib/Hamlib
Basic rigctld password working -- still need to add secure method -- plain text right now
https://github.com/Hamlib/Hamlib/issues/813pull/978/head
rodzic
c5a5276b15
commit
499198bf50
9
NEWS
9
NEWS
|
@ -10,11 +10,14 @@ Please send Hamlib bug reports to hamlib-developer@lists.sourceforge.net
|
||||||
Version 5.x -- future
|
Version 5.x -- future
|
||||||
* rig_get_conf deprecated and replaced by rig_get_conf2
|
* rig_get_conf deprecated and replaced by rig_get_conf2
|
||||||
* rot_get_conf deprecated and replaced by rot_get_conf2
|
* rot_get_conf deprecated and replaced by rot_get_conf2
|
||||||
* Asynchronous rig data output handling to support transceive and spectrum data. Mikael, OH3BHX
|
|
||||||
* Multicast UDP packet output for asynchronous data. Mikael, OH3BHX
|
|
||||||
* Rig state poll routine to serve commonly used data like frequency and mode from cache. Mikael, OH3BHX
|
|
||||||
|
|
||||||
Version 4.5
|
Version 4.5
|
||||||
|
* 2022-03-XX
|
||||||
|
* Add password capability to rigctld via -A switch. rigctl uses \password, hamlib uses rig_set_password
|
||||||
|
* Asynchronous rig data output handling to support transceive and spectrum data. Mikael, OH3BHX
|
||||||
|
* See new set_conf option async for some Icom rigs
|
||||||
|
* Multicast UDP packet output for asynchronous data. Mikael, OH3BHX
|
||||||
|
* Rig state poll routine to serve commonly used data like frequency and mode from cache. Mikael, OH3BHX
|
||||||
* deprecated hamlib_port_t at front of rig_state structure -- new one at end of structure
|
* deprecated hamlib_port_t at front of rig_state structure -- new one at end of structure
|
||||||
* New RIG_LEVEL_BAND_SELECT for Yaesu rigs
|
* New RIG_LEVEL_BAND_SELECT for Yaesu rigs
|
||||||
* 202?-??-??
|
* 202?-??-??
|
||||||
|
|
|
@ -358,6 +358,10 @@ Use only in combination with the
|
||||||
option as it generates no output on its own.
|
option as it generates no output on its own.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.BR \-A ", " \-\-password
|
||||||
|
Sets password on rigcltd which requires hamlib to use rig_set_paswword and rigctl to use \\password to access rigctld
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.BR \-h ", " \-\-help
|
.BR \-h ", " \-\-help
|
||||||
Show a summary of these options and exit.
|
Show a summary of these options and exit.
|
||||||
.
|
.
|
||||||
|
|
|
@ -2633,14 +2633,17 @@ static int netrigctl_power2mW(RIG *rig, unsigned int *mwpower, float power,
|
||||||
int netrigctl_password(RIG *rig, const unsigned char *key1, const unsigned char *key2)
|
int netrigctl_password(RIG *rig, const unsigned char *key1, const unsigned char *key2)
|
||||||
{
|
{
|
||||||
char cmdbuf[256];
|
char cmdbuf[256];
|
||||||
char buf[256];
|
char buf[BUF_MAX];
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: key1=%s, key2=%s\n", __func__, key1, key2);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: key1=%s, key2=%s\n", __func__, key1, key2);
|
||||||
SNPRINTF(cmdbuf, sizeof(cmdbuf), "\\password %s\n", key1);
|
SNPRINTF(cmdbuf, sizeof(cmdbuf), "\\password %s\n", key1);
|
||||||
retval = netrigctl_transaction(rig, cmdbuf, strlen(cmdbuf), buf);
|
retval = netrigctl_transaction(rig, cmdbuf, strlen(cmdbuf), buf);
|
||||||
|
return RIG_OK;
|
||||||
|
#if 0
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -7106,6 +7106,7 @@ HAMLIB_EXPORT(int) rig_password(RIG *rig, const unsigned char *key1, const unsig
|
||||||
if (rig->caps->password != NULL)
|
if (rig->caps->password != NULL)
|
||||||
{
|
{
|
||||||
retval = rig->caps->password(rig,key1,key2);
|
retval = rig->caps->password(rig,key1,key2);
|
||||||
|
//retval = RIG_OK;
|
||||||
}
|
}
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1695,6 +1695,7 @@ readline_repeat:
|
||||||
{
|
{
|
||||||
if (strcmp(cmd_entry->arg1,"ChkVFO")==0) preCmd = 1;
|
if (strcmp(cmd_entry->arg1,"ChkVFO")==0) preCmd = 1;
|
||||||
else if (strcmp(cmd_entry->arg1,"VFO")==0) preCmd = 1;
|
else if (strcmp(cmd_entry->arg1,"VFO")==0) preCmd = 1;
|
||||||
|
else if (strcmp(cmd_entry->arg1,"Password")==0) preCmd = 1;
|
||||||
}
|
}
|
||||||
if (use_password && !is_passwordOK && (cmd_entry->arg1 != NULL) && !preCmd)
|
if (use_password && !is_passwordOK && (cmd_entry->arg1 != NULL) && !preCmd)
|
||||||
{
|
{
|
||||||
|
@ -4952,7 +4953,13 @@ declare_proto_rig(password)
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
if (is_rigctld)
|
if (is_rigctld)
|
||||||
{
|
{
|
||||||
retval = rigctld_password_check(rig, (unsigned char*)passwd, NULL);
|
retval = rigctld_password_check(rig, (unsigned char*)passwd, "key2");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
retval = rig_password(rig, (unsigned char*) passwd, (unsigned char*)"key2");
|
||||||
|
//retval = RIG_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (retval == RIG_OK)
|
if (retval == RIG_OK)
|
||||||
{
|
{
|
||||||
|
@ -4964,11 +4971,6 @@ declare_proto_rig(password)
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: password error, '%s'!='%s'\n", __func__,
|
rig_debug(RIG_DEBUG_ERR, "%s: password error, '%s'!='%s'\n", __func__,
|
||||||
passwd, rigctld_password);
|
passwd, rigctld_password);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: not implemente\n", __func__);
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURNFUNC(retval);
|
RETURNFUNC(retval);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue