* [PATCH] cleanup: removed last references to g_conf from auth
@ 2013-08-27 9:20 Roald van Loon
2013-08-27 9:49 ` Roald J. van Loon
2013-08-27 15:18 ` Sage Weil
0 siblings, 2 replies; 5+ messages in thread
From: Roald van Loon @ 2013-08-27 9:20 UTC (permalink / raw)
To: ceph-devel@vger.kernel.org
Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
Replaced them in favor of cct->_conf.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
---
diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc
index e0c8174..e57b557 100644
--- a/src/auth/cephx/CephxKeyServer.cc
+++ b/src/auth/cephx/CephxKeyServer.cc
@@ -163,7 +163,7 @@ bool KeyServer::_check_rotating_secrets()
ldout(cct, 10) << __func__ << " added " << added << dendl;
data.rotating_ver++;
//data.next_rotating_time = ceph_clock_now(cct);
- //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl,
g_conf->auth_service_ticket_ttl);
+ //data.next_rotating_time += MIN(cct->_conf->auth_mon_ticket_ttl,
cct->_conf->auth_service_ticket_ttl);
_dump_rotating_secrets();
return true;
}
@@ -191,7 +191,7 @@ int KeyServer::_rotate_secret(uint32_t service_id)
RotatingSecrets& r = data.rotating_secrets[service_id];
int added = 0;
utime_t now = ceph_clock_now(cct);
- double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ?
g_conf->auth_mon_ticket_ttl : g_conf->auth_service_ticket_ttl;
+ double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ?
cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
while (r.need_new_secrets(now)) {
ExpiringCryptoKey ek;
@@ -424,7 +424,7 @@ int KeyServer::_build_session_auth_info(uint32_t
service_id, CephXServiceTicketI
{
info.service_id = service_id;
info.ticket = auth_ticket_info.ticket;
- info.ticket.init_timestamps(ceph_clock_now(cct),
g_conf->auth_service_ticket_ttl);
+ info.ticket.init_timestamps(ceph_clock_now(cct),
cct->_conf->auth_service_ticket_ttl);
generate_secret(info.session_key);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] cleanup: removed last references to g_conf from auth
2013-08-27 9:20 [PATCH] cleanup: removed last references to g_conf from auth Roald van Loon
@ 2013-08-27 9:49 ` Roald J. van Loon
2013-08-27 9:51 ` Roald van Loon
2013-08-27 15:18 ` Sage Weil
1 sibling, 1 reply; 5+ messages in thread
From: Roald J. van Loon @ 2013-08-27 9:49 UTC (permalink / raw)
To: ceph-devel
Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
Replaced them in favor of cct->_conf.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
---
src/auth/cephx/CephxKeyServer.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc
index e0c8174..e57b557 100644
--- a/src/auth/cephx/CephxKeyServer.cc
+++ b/src/auth/cephx/CephxKeyServer.cc
@@ -163,7 +163,7 @@ bool KeyServer::_check_rotating_secrets()
ldout(cct, 10) << __func__ << " added " << added << dendl;
data.rotating_ver++;
//data.next_rotating_time = ceph_clock_now(cct);
- //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl, g_conf->auth_service_ticket_ttl);
+ //data.next_rotating_time += MIN(cct->_conf->auth_mon_ticket_ttl, cct->_conf->auth_service_ticket_ttl);
_dump_rotating_secrets();
return true;
}
@@ -191,7 +191,7 @@ int KeyServer::_rotate_secret(uint32_t service_id)
RotatingSecrets& r = data.rotating_secrets[service_id];
int added = 0;
utime_t now = ceph_clock_now(cct);
- double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? g_conf->auth_mon_ticket_ttl : g_conf->auth_service_ticket_ttl;
+ double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
while (r.need_new_secrets(now)) {
ExpiringCryptoKey ek;
@@ -424,7 +424,7 @@ int KeyServer::_build_session_auth_info(uint32_t service_id, CephXServiceTicketI
{
info.service_id = service_id;
info.ticket = auth_ticket_info.ticket;
- info.ticket.init_timestamps(ceph_clock_now(cct), g_conf->auth_service_ticket_ttl);
+ info.ticket.init_timestamps(ceph_clock_now(cct), cct->_conf->auth_service_ticket_ttl);
generate_secret(info.session_key);
--
1.7.12.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cleanup: removed last references to g_conf from auth
2013-08-27 9:49 ` Roald J. van Loon
@ 2013-08-27 9:51 ` Roald van Loon
2013-08-27 15:19 ` Sage Weil
0 siblings, 1 reply; 5+ messages in thread
From: Roald van Loon @ 2013-08-27 9:51 UTC (permalink / raw)
To: ceph-devel@vger.kernel.org
Sorry, the format-patch of the first email was screwed up (tried to
copy/paste the email because git was compiled without perl and hence
had no send-email support... should have known that would go haywire)
Roald
On Tue, Aug 27, 2013 at 11:49 AM, Roald J. van Loon
<roaldvanloon@gmail.com> wrote:
> Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
> Replaced them in favor of cct->_conf.
>
> Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
> ---
> src/auth/cephx/CephxKeyServer.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc
> index e0c8174..e57b557 100644
> --- a/src/auth/cephx/CephxKeyServer.cc
> +++ b/src/auth/cephx/CephxKeyServer.cc
> @@ -163,7 +163,7 @@ bool KeyServer::_check_rotating_secrets()
> ldout(cct, 10) << __func__ << " added " << added << dendl;
> data.rotating_ver++;
> //data.next_rotating_time = ceph_clock_now(cct);
> - //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl, g_conf->auth_service_ticket_ttl);
> + //data.next_rotating_time += MIN(cct->_conf->auth_mon_ticket_ttl, cct->_conf->auth_service_ticket_ttl);
> _dump_rotating_secrets();
> return true;
> }
> @@ -191,7 +191,7 @@ int KeyServer::_rotate_secret(uint32_t service_id)
> RotatingSecrets& r = data.rotating_secrets[service_id];
> int added = 0;
> utime_t now = ceph_clock_now(cct);
> - double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? g_conf->auth_mon_ticket_ttl : g_conf->auth_service_ticket_ttl;
> + double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
>
> while (r.need_new_secrets(now)) {
> ExpiringCryptoKey ek;
> @@ -424,7 +424,7 @@ int KeyServer::_build_session_auth_info(uint32_t service_id, CephXServiceTicketI
> {
> info.service_id = service_id;
> info.ticket = auth_ticket_info.ticket;
> - info.ticket.init_timestamps(ceph_clock_now(cct), g_conf->auth_service_ticket_ttl);
> + info.ticket.init_timestamps(ceph_clock_now(cct), cct->_conf->auth_service_ticket_ttl);
>
> generate_secret(info.session_key);
>
> --
> 1.7.12.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cleanup: removed last references to g_conf from auth
2013-08-27 9:20 [PATCH] cleanup: removed last references to g_conf from auth Roald van Loon
2013-08-27 9:49 ` Roald J. van Loon
@ 2013-08-27 15:18 ` Sage Weil
1 sibling, 0 replies; 5+ messages in thread
From: Sage Weil @ 2013-08-27 15:18 UTC (permalink / raw)
To: Roald van Loon; +Cc: ceph-devel@vger.kernel.org
Applied, thanks!
BTW the patch whitespace was mangled; I had to tweak it to make it apply.
Gmail is a common culprit here.
sage
On Tue, 27 Aug 2013, Roald van Loon wrote:
> Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
> Replaced them in favor of cct->_conf.
>
> Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
> ---
> diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc
> index e0c8174..e57b557 100644
> --- a/src/auth/cephx/CephxKeyServer.cc
> +++ b/src/auth/cephx/CephxKeyServer.cc
> @@ -163,7 +163,7 @@ bool KeyServer::_check_rotating_secrets()
> ldout(cct, 10) << __func__ << " added " << added << dendl;
> data.rotating_ver++;
> //data.next_rotating_time = ceph_clock_now(cct);
> - //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl,
> g_conf->auth_service_ticket_ttl);
> + //data.next_rotating_time += MIN(cct->_conf->auth_mon_ticket_ttl,
> cct->_conf->auth_service_ticket_ttl);
> _dump_rotating_secrets();
> return true;
> }
> @@ -191,7 +191,7 @@ int KeyServer::_rotate_secret(uint32_t service_id)
> RotatingSecrets& r = data.rotating_secrets[service_id];
> int added = 0;
> utime_t now = ceph_clock_now(cct);
> - double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ?
> g_conf->auth_mon_ticket_ttl : g_conf->auth_service_ticket_ttl;
> + double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ?
> cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
>
> while (r.need_new_secrets(now)) {
> ExpiringCryptoKey ek;
> @@ -424,7 +424,7 @@ int KeyServer::_build_session_auth_info(uint32_t
> service_id, CephXServiceTicketI
> {
> info.service_id = service_id;
> info.ticket = auth_ticket_info.ticket;
> - info.ticket.init_timestamps(ceph_clock_now(cct),
> g_conf->auth_service_ticket_ttl);
> + info.ticket.init_timestamps(ceph_clock_now(cct),
> cct->_conf->auth_service_ticket_ttl);
>
> generate_secret(info.session_key);
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cleanup: removed last references to g_conf from auth
2013-08-27 9:51 ` Roald van Loon
@ 2013-08-27 15:19 ` Sage Weil
0 siblings, 0 replies; 5+ messages in thread
From: Sage Weil @ 2013-08-27 15:19 UTC (permalink / raw)
To: Roald van Loon; +Cc: ceph-devel@vger.kernel.org
On Tue, 27 Aug 2013, Roald van Loon wrote:
> Sorry, the format-patch of the first email was screwed up (tried to
> copy/paste the email because git was compiled without perl and hence
> had no send-email support... should have known that would go haywire)
Ha, no problem. Applied now, thanks!
sage
>
> Roald
>
> On Tue, Aug 27, 2013 at 11:49 AM, Roald J. van Loon
> <roaldvanloon@gmail.com> wrote:
> > Trivial cleanup. There were still 3 references to g_conf in CephxKeyServer.
> > Replaced them in favor of cct->_conf.
> >
> > Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
> > ---
> > src/auth/cephx/CephxKeyServer.cc | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc
> > index e0c8174..e57b557 100644
> > --- a/src/auth/cephx/CephxKeyServer.cc
> > +++ b/src/auth/cephx/CephxKeyServer.cc
> > @@ -163,7 +163,7 @@ bool KeyServer::_check_rotating_secrets()
> > ldout(cct, 10) << __func__ << " added " << added << dendl;
> > data.rotating_ver++;
> > //data.next_rotating_time = ceph_clock_now(cct);
> > - //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl, g_conf->auth_service_ticket_ttl);
> > + //data.next_rotating_time += MIN(cct->_conf->auth_mon_ticket_ttl, cct->_conf->auth_service_ticket_ttl);
> > _dump_rotating_secrets();
> > return true;
> > }
> > @@ -191,7 +191,7 @@ int KeyServer::_rotate_secret(uint32_t service_id)
> > RotatingSecrets& r = data.rotating_secrets[service_id];
> > int added = 0;
> > utime_t now = ceph_clock_now(cct);
> > - double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? g_conf->auth_mon_ticket_ttl : g_conf->auth_service_ticket_ttl;
> > + double ttl = service_id == CEPH_ENTITY_TYPE_AUTH ? cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
> >
> > while (r.need_new_secrets(now)) {
> > ExpiringCryptoKey ek;
> > @@ -424,7 +424,7 @@ int KeyServer::_build_session_auth_info(uint32_t service_id, CephXServiceTicketI
> > {
> > info.service_id = service_id;
> > info.ticket = auth_ticket_info.ticket;
> > - info.ticket.init_timestamps(ceph_clock_now(cct), g_conf->auth_service_ticket_ttl);
> > + info.ticket.init_timestamps(ceph_clock_now(cct), cct->_conf->auth_service_ticket_ttl);
> >
> > generate_secret(info.session_key);
> >
> > --
> > 1.7.12.4
> >
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-27 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 9:20 [PATCH] cleanup: removed last references to g_conf from auth Roald van Loon
2013-08-27 9:49 ` Roald J. van Loon
2013-08-27 9:51 ` Roald van Loon
2013-08-27 15:19 ` Sage Weil
2013-08-27 15:18 ` Sage Weil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.