Change in osmo-sgsn[master]: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon May 27 08:54:15 UTC 2019


Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/14195 )

Change subject: osmo-sgsn: get rid of OSMO_ASSERT() in 'auth-policy' handler
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/14195/1//COMMIT_MSG@22
PS1, Line 22:   auth-policy c
> So you say in this case argv[0] is "c" instead of "closed"? That's IMHO wrong and should be fixed in […]
Yes, the VTY parser would pass any of those variations.

I guess the problem is that we are doing:

  strncmp( choice, input, strlen(input) )

somewhere in the VTY code, so for example:

  strncmp( "accept-all", "accept", 6 ) == 0
  strncmp( "accept-all", "acc", 3 ) == 0
  strncmp( "accept-all", "a", 1 ) == 0
  strncmp( "accept-all", "", 0 ) == 0

Also, that's probably why you can type:

  - "en" instead of "enable",
  - "subscr" instead of "subscriber".

Unfortunately, I am not familiar with the internals of libosmovty, so for now it makes sense at least to avoid segfault'ing here.



-- 
To view, visit https://gerrit.osmocom.org/14195
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If9b0c0d031477ca87786aab5c269d00748e896c8
Gerrit-Change-Number: 14195
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 27 May 2019 08:54:15 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190527/71fb601f/attachment.htm>


More information about the gerrit-log mailing list