But fix and update to the warning given during user/password checking
This commit is contained in:
2 files changed
+4
-9
No files matched your search
+2
-2
@@ -50,7 +50,7 @@ impl RtspServer {
|
||||
let factory = RTSPMediaFactory::new();
|
||||
|
||||
for permitted_user in permitted_users {
|
||||
debug!("Permitting {} to access {}", permitted_user, names.join(", "));
|
||||
debug!("Permitting {} to access {}", permitted_user, paths.join(", "));
|
||||
self.add_watcher_role(&factory, &permitted_user)
|
||||
}
|
||||
// During auth, first it binds anonymously. At this point it checks
|
||||
@@ -60,7 +60,7 @@ impl RtspServer {
|
||||
// It loads the auth token of the user and checks that users
|
||||
// RTSP_PERM_MEDIA_FACTORY_CONSTRUCT allowing them to play
|
||||
// As a result of this we must ensure that if anonymous is not granted watcher
|
||||
// access that anon has at least RTSP_PERM_MEDIA_FACTORY_ACCESS
|
||||
// access that anon has at least RTSP_PERM_MEDIA_FACTORY_ACCESS
|
||||
if ! permitted_users.contains(&"anonymous".to_string()) {
|
||||
self.add_check_role(&factory, "anonymous");
|
||||
}
|
||||
|
||||
+2
-7
@@ -165,14 +165,9 @@ fn set_up_users(users: &Vec<UserConfig>, rtsp: &RtspServer) {
|
||||
let user_pass = match (name, pass) {
|
||||
(Some(name), Some(pass)) => {
|
||||
Some((&name as &str, &pass as &str))
|
||||
}
|
||||
(Some(name), None) => {
|
||||
warn!("One of the users has no password, skipping this user");
|
||||
debug!("The skipped user was {}", name);
|
||||
None
|
||||
},
|
||||
(None, Some(_pass)) => {
|
||||
warn!("One of the users has a password but no name, skipping this user");
|
||||
(Some(_), None) | (None, Some(_)) => {
|
||||
warn!("Username and password must be supplied together - ignoring [[users]] entry");
|
||||
None
|
||||
},
|
||||
_ => None,
|
||||
|
||||
Reference in new issue
Block a user