Revision 821601ea monitor.c
b/monitor.c | ||
---|---|---|
1020 | 1020 |
return 0; |
1021 | 1021 |
} |
1022 | 1022 |
|
1023 |
#ifdef CONFIG_VNC |
|
1023 | 1024 |
static int change_vnc_password(const char *password) |
1024 | 1025 |
{ |
1025 | 1026 |
if (!password || !password[0]) { |
... | ... | |
1066 | 1067 |
|
1067 | 1068 |
return 0; |
1068 | 1069 |
} |
1070 |
#else |
|
1071 |
static int do_change_vnc(Monitor *mon, const char *target, const char *arg) |
|
1072 |
{ |
|
1073 |
qerror_report(QERR_FEATURE_DISABLED, "vnc"); |
|
1074 |
return -ENODEV; |
|
1075 |
} |
|
1076 |
#endif |
|
1069 | 1077 |
|
1070 | 1078 |
/** |
1071 | 1079 |
* do_change(): Change a removable medium, or VNC configuration |
... | ... | |
1131 | 1139 |
} |
1132 | 1140 |
/* Note that setting an empty password will not disable login through |
1133 | 1141 |
* this interface. */ |
1134 |
rc = vnc_display_password(NULL, password); |
|
1135 |
if (rc != 0) { |
|
1136 |
qerror_report(QERR_SET_PASSWD_FAILED); |
|
1137 |
return -1; |
|
1138 |
} |
|
1139 |
return 0; |
|
1142 |
return vnc_display_password(NULL, password); |
|
1140 | 1143 |
} |
1141 | 1144 |
|
1142 | 1145 |
qerror_report(QERR_INVALID_PARAMETER, "protocol"); |
... | ... | |
1175 | 1178 |
} |
1176 | 1179 |
|
1177 | 1180 |
if (strcmp(protocol, "vnc") == 0) { |
1178 |
rc = vnc_display_pw_expire(NULL, when); |
|
1179 |
if (rc != 0) { |
|
1180 |
qerror_report(QERR_SET_PASSWD_FAILED); |
|
1181 |
return -1; |
|
1182 |
} |
|
1183 |
return 0; |
|
1181 |
return vnc_display_pw_expire(NULL, when); |
|
1184 | 1182 |
} |
1185 | 1183 |
|
1186 | 1184 |
qerror_report(QERR_INVALID_PARAMETER, "protocol"); |
Also available in: Unified diff