Invest-currency.ru

Как обезопасить себя в кризис?
1 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

No config space access function found

No config space access function found

харе флудить
а то закроем
_________________
-= Errare humanum est. =-

Последний раз редактировалось: Alex A. Florov (03:11 04-05-2011), всего редактировалось 1 раз

Всем ку.
У меня тут появилась мысля, чтобы на моей онлайн-радио станции определенные жанры музыки играли в определенный период времени.
Логическую цепочку я выстроил, но как это реализовать — не знаю, наверное с помощью крон, но в его синтаксисе и командах не разбираюсь совсем. Итак, что имеется:
1) Shoutcast сервер узнает об имеющихся треках на сервере через playlist.txt
2) Чтобы изменить плейлист (точнее применить изменения) — нужен рестарт шауткаст сервера.
Логическая цепочка:

1) Время 00:00 — включаем транс музыку из каталога /usr/local/shoutcast/trance/ (т.е. подменяем имя файла trance.txt со списком треков на playlist.txt, перед этим текущий playlist.txt меняет имя на techno.txt)
2) рестартим /usr/local/shoutcast/.sc_trans
3) Время 08:00 — включаем драм энд басс музыку из каталога /usr/local/shoutcast/dnb/ (playlist.txt возвращает свое нормальное имя trance.txt, dnb.txt становится playlist.txt)
4) рестартим /usr/local/shoutcast/.sc_trans
5) Время 12:00 — включаем техно музыку из каталога /usr/local/shoutcast/techno (playlist.txt возвращает свое имя на dnb.txt, techno.txt становится playlist.txt)
5) рестартим /usr/local/shoutcast/.sc_trans
и т.д. и т.п.
n) время 22:00 — включаем техно музыку из каталога /usr/local/shoutcast/techno (playlist.txt возвращает свое имя на dnb.txt, techno.txt становится playlist.txt)
n+1) рестартим /usr/local/shoutcast/.sc_trans
возвращаемся к 1) логической цепочки

Как можно такое реализовать с помощью крон, например?
есть еще достаточно неплохая, на мой взгляд, мысля, тупо создавать в нужное время ярлык для каждого плейлиста с жанром, ярлык будет ессно носить имя playlist.txt, что, я думаю, реализуется проще в плане громоздкости.
_________________
Когда мудрец утратил истины смысл,
Глупец на ладонях принес мудрецу им же разбросанный бисер.

Последний раз редактировалось: A.Mansurov (20:32 29-04-2011), всего редактировалось 2 раз(а)

Зарегистрирован: 17.10.2004

1. Естественно, надо playlist.txt делать линком на текущий плейлист.
2. Не надо разбираться с синтаксисом крона. Всё. что тебе надо, это короткий скриптик на любом знакомом тебе языке, который при запуске проверит, который сейчас час, заменит линк на плейлист и пнёт сервер на перечитку.
Сделать линк на скрипт в каталоге cron.hourly, дело в шляпе.
3. Рестартить сервер — грубо и некультурно. Текущий трек тупо прервётся, а это некрасиво как минимум. Почитай документацию, наверняка есть возможность заставить сервер перечитать плейлист без рестарта.
_________________
Люблю свободный полёт. 🙂

Последний раз редактировалось: AnrDaemon (21:47 29-04-2011), всего редактировалось 1 раз

Зарегистрирован: 17.10.2004

Зарегистрирован: 17.10.2004

Зарегистрирован: 17.10.2004

No config space access function found

CloudLinux OS is the super-platform for stability and efficiency in shared hosting, developed to address the unique needs of web hosts.

Learn more

KernelCare keeps your kernels up-to-date with live, automated security updates. Perfect for hosters and enterprises alike.

Learn more

Imunify360 provides the ultimate security for CentOS, RHEL, and CloudLinux OS Web servers.

Learn more

Become a Partner

If you are a dedicated hosting provider or run a Data Center, join us to deliver security and stability to your customers.

Learn more

We offer marketing support for our partners to ensure they get started easily and keep up-to-date on everything important.

Learn more

Explore our Partner Directory to find distributors or strategic partners and see the list of supported control panels.

Learn more

We’ve compiled a collection of videos to help you get started quickly.

Learn more

Contact CloudLinux Helpdesk with any technical and billing questions.

Learn more

The CloudLinux Network portal gives faster access to purchasing, documentation, and more.

Learn more

The latest news and press releases covering all CloudLinux products.

Learn more

And, we telecommute! Do what you do best from anywhere in the world.

Learn more

Call Sales at +1 (800) 231-7307 or email [email protected]

Learn more

I keep getting errors when upgrading my centos servers. Why does this happen?
I use CentOS 6 x86_64 as a xen pv template. cpanel is installed and i use the upgrade script.

The errors are like this:

Error Downloading Packages:
lve-0.9-0.2.el6.x86_64: failed to retrieve getPackage/lve-0.9-0.2.el6.x86_64.rpm from cloudlinux-x86_64-server-6
error was [Errno 14] PYCURL ERROR 51 — «SSL: certificate subject name ‘xmlrpc.cln.cloudlinux.com’ does not match target host name ‘ams-proxy.cl-mirror.net'»

  1. 02.09.2011 08:09:23
  2. # 1

  1. 02.09.2011 08:09:05
  2. # 2

Ok.. It seems that the upgrade script select wrong kernels too.
It should use kernel-xen but it dosen’t.

Is there a fix for this also?

  1. 02.09.2011 08:09:52
  2. # 3

1. Edit /etc/sysconfig/kernel
Change DEFAULTKERNEL from kernel to kernel-xen
If you don’t have that file, create it, and populate it with this:

# UPDATEDEFAULT=yes
# new kernels the default
UPDATEDEFAULT=yes

# DEFAULTKERNEL specifies the default kernel package type
DEFAULTKERNEL=kernel-xen

2. Do:
yum install kernel-xen

3. Don’t skip this step:
rpm -qa|grep kernel
Take all non-xen kernels, and for each of them:
rpm -e kernel-.
(full version of a kernel)

If you leave any non kernel-xen packages, future yum updates will update those packages as well.

  1. 02.09.2011 08:09:56
  2. # 4

  1. 02.09.2011 08:09:45
  2. # 5

  1. 02.09.2011 08:09:14
  2. # 6

xen kernel come in a package named:
kernel-xen

and when you do uname -r it will show up as:
2.6.32-231.6.1.lve0.9.8.x86_64xen

or something similar

  1. 02.09.2011 08:09:45
  2. # 7

Well.. It doesn’t really seem to work with the xen kernel.

# yum install kernel-xen
Loaded plugins: fastestmirror, rhnplugin
Loading mirror speeds from cached hostfile
* cloudlinux-x86_64-server-6: ams-proxy.cl-mirror.net
Setting up Install Process
Package kernel-2.6.32-231.6.1.lve0.9.8.x86_64 already installed and latest version
Nothing to do

# rpm -qa|grep kernel
kernel-2.6.32-71.29.1.el6.x86_64
kernel-firmware-2.6.32-231.6.1.lve0.9.8.noarch
kernel-devel-2.6.32-231.6.1.lve0.9.8.x86_64
dracut-kernel-004-33.2.el6_0.noarch
kernel-headers-2.6.32-231.6.1.lve0.9.8.x86_64
kernel-2.6.32-231.6.1.lve0.9.8.x86_64

  1. 02.09.2011 10:09:15
  2. # 8

  1. 02.09.2011 14:09:15
  2. # 9

When i boot this kernel it fails. Are you able to see why from this trace?

Как работает безопасность access_control?¶

Для каждого входящего запроса, Symfony роверяет каждую запись access_control , чтобы найти одну, соответствующую текущему запросу. Как только она находит совпадающую запись access_control , она останавливается — только первая совпадающая access_control используется для предоставления доступа.

Каждый access_control имеет несколько опций, которые конфигурируют две разных вещи:

1. Опции совпадения¶

Symfony создаёт экземпляр класса RequestMatcher для каждой записи access_control , который определяет должно ли быть использовано данное управлеие доступом в этом запросе. Слелдующие опции access_control используются для сопоставления:

Возьмите следующие записи access_control в качестве примера:

Для каждого входящего запроса, Symfony будет решать, какой access_control использовать, основываясь на URI, IP-адресе клиента, имени входящего хоста и методе запроса. Помните, используется первое совпадающее правило, и если для записи не указаны ip , host или method , то этот access_control совпадёт с любым ip , host или method :

2. Форсирование доступа¶

После того, как Symfony решила, какая запись access_control совпадает (если таковая есть), она форсирует ограничения доступа, основанные на опциях roles , allow_if и requires_channel :

  • roles Если пользователь не имеет данной(ых) роли(ей), то в доступе будет отказано (внутренне, вызывается AccessDeniedException );
  • allow_if Если выражение возвращает «неверно», то в доступе будет отказано;
  • requires_channel Если канал входящего запроса (например, http ) не совпадает с этим значением (например, https ), пользователь будет перенаправлен (например, перенаправлен с http на https , или наоборот).

Если в доступе отказано, система попробует аутентифицировать пользователя, если это ещё не было сделано (например, перенаправить ползователя на страницу входа). Если пользователь уже выполил вход, будет показана страница ошибки 403 «доступ запрещён». Смотрите How to Customize Error Pages, чтобы узнать больше.

Соответствие access_control по IP¶

Некоторые ситуации могут возникнуть, когда вам нужна запись access_control , которая совпадает только с запросами, исходящими от какого-то IP-адреса или их спектра. Например, это может быть использовано, для отказа в доступе к URL-шаблону для всех запросов, кроме тех, что исходят от внутреннего доверенного сервера.

Как вы прочтёте в объяснении под примером, опция ips не ограничивается конкретным IP-адресом. Вместо этого, использование ключа ips означает, что запись access_control будет совпадать только с этим IP-адресом, а пользователи, получающие доступ к ней с других IP-адресов, будут идти дальше по списку access_control .

Вот пример того, как вы можете сконфигурировать некоторый шаблон URL /internal* так, чтобы он был доступен только по запросам с локального сервера:

Вот, как это работает, когда путь — /internal/something исходит от внешнего IP-адреса 10.0.0.1 :

  • Первое правило контроля доступа игнорируется, так как path совпадает, но IP-адреса не совпадают ни с одним из перечисленных IP;
  • Включается второе правило контроля доступа (единственное ограничение — path ) и оно совпадает. Если вы убедитесь в том, что ни один пользователь не имеет ROLE_NO_ACCESS , то в доступе будет отказано ( ROLE_NO_ACCESS может быть чем угодно, что не совпадает с существующей ролью, оно просто служит способом всегда отказывать в доступе).

Но если тот же запрос поступит от 127.0.0.1 или ::1 (адрес обратной связи IPv6):

  • Теперь, первое правило контроля доступа включается, так как совпадает и path и ip : доступ разрешён, так как пользователь всегда имеет роль IS_AUTHENTICATED_ANONYMOUSLY .
  • Второе правило контроля доступа не рассматривается, так как совпало первое.

Безопасность по выражению¶

Когда запись access_control совпадает, вы можете отказать в доступе через ключ roles или использовать более сложную логику с выражением в ключе allow_if :

Network security configuration

The Network Security Configuration feature lets apps customize their network security settings in a safe, declarative configuration file without modifying app code. These settings can be configured for specific domains and for a specific app. The key capabilities of this feature are as follows:

  • Custom trust anchors: Customize which Certificate Authorities (CA) are trusted for an app’s secure connections. For example, trusting particular self-signed certificates or restricting the set of public CAs that the app trusts.
  • Debug-only overrides: Safely debug secure connections in an app without added risk to the installed base.
  • Cleartext traffic opt-out: Protect apps from accidental usage of cleartext traffic.
  • Certificate pinning: Restrict an app’s secure connection to particular certificates.

Add a Network Security Configuration file

The Network Security Configuration feature uses an XML file where you specify the settings for your app. You must include an entry in the manifest of your app to point to this file. The following code excerpt from a manifest demonstrates how to create this entry:

Customize trusted CAs

An app may want to trust a custom set of CAs instead of the platform default. The most common reasons of this are:

  • Connecting to a host with a custom certificate authority, such as a CA that is self-signed or is issued internally within a company.
  • Limiting the set of CAs to only the CAs you trust instead of every pre-installed CA.
  • Trusting additional CAs not included in the system.

By default, secure connections (using protocols like TLS and HTTPS) from all apps trust the pre-installed system CAs, and apps targeting Android 6.0 (API level 23) and lower also trust the user-added CA store by default. An app can customize its own connections using base-config (for app-wide customization) or domain-config (for per-domain customization).

Configure a custom CA

Assume you want to connect to your host which uses a self-signed SSL certificate or to a host whose SSL certificate is issued by a non-public CA which you trust, such as your company’s internal CA.

Add the self-signed or non-public CA certificate, in PEM or DER format, to res/raw/my_ca .

Limit the set of trusted CAs

An app that does not want to trust all CAs trusted by system can instead specify its own reduced set of CAs to trust. This protects the app from fraudulent certificates issued by any of the other CAs.

The configuration to limit the set of trusted CAs is similar to trusting a custom CA for a specific domain except that multiple CAs are provided in the resource.

Add the trusted CAs, in PEM or DER format, to res/raw/trusted_roots . Note that if using PEM format the file must contain only PEM data and no extra text. You can also provide multiple elements instead of one.

Trust additional CAs

An app may want to trust additional CAs not trusted by the system, this could be due to the system not yet including the CA or a CA that does not meet the requirements for inclusion into the Android system. An app can do this by specifying multiple certificate sources for a configuration.

Configure CAs for debugging

When debugging an app that connects over HTTPS, you may want to connect to a local development server, which does not have the SSL certificate for your production server. In order to support this without any modification to your app’s code, you can specify debug-only CAs, which are trusted only when android:debuggable is true , by using debug-overrides . Normally, IDEs and build tools set this flag automatically for non-release builds.

This is safer than the usual conditional code because, as a security precaution, app stores do not accept apps which are marked debuggable.

Opt out of cleartext traffic

Note: The guidance in this section applies only to apps that target Android 8.1 (API level 27) or lower. Starting with Android 9 (API level 28), cleartext support is disabled by default.

Applications intending to connect to destinations using only secure connections can opt-out of supporting cleartext (using the unencrypted HTTP protocol instead of HTTPS) to those destinations. This option helps prevent accidental regressions in apps due to changes in URLs provided by external sources such as backend servers. See NetworkSecurityPolicy.isCleartextTrafficPermitted() for more details.

For example, an app may want to ensure that all connections to secure.example.com are always done over HTTPS to protect sensitive traffic from hostile networks.

Pin certificates

Normally, an app trusts all pre-installed CAs. If any of these CAs were to issue a fraudulent certificate, the app would be at risk from a man-in-the-middle attack. Some apps choose to limit the set of certificates they accept by either limiting the set of CAs they trust or by certificate pinning.

Certificate pinning is done by providing a set of certificates by hash of the public key ( SubjectPublicKeyInfo of the X.509 certificate). A certificate chain is then valid only if the certificate chain contains at least one of the pinned public keys.

Note that, when using certificate pinning, you should always include a backup key so that if you are forced to switch to new keys or change CAs (when pinning to a CA certificate or an intermediate of that CA), your app’s connectivity is unaffected. Otherwise, you must push out an update to the app to restore connectivity.

Additionally, it is possible to set an expiration time for pins after which pinning is not performed. This helps prevent connectivity issues in apps which have not been updated. However, setting an expiration time on pins may enable pinning bypass.

Configuration inheritance behavior

Values not set in a specific configuration are inherited. This behavior allows more complex configurations while keeping the configuration file readable.

If a value is not set in a specific entry, then the value from the more general entry is used. For example, values not set in a domain-config are taken from the parent domain-config , if nested, or from the base-config if not. Values not set in the base-config use the platform default values.

For example, consider where all connections to subdomains of example.com must use a custom set of CAs. Additonally, cleartext traffic to these domains is permitted except when connecting to secure.example.com . By nesting the configuration for secure.example.com inside the configuration for example.com , the trust-anchors does not need to be duplicated.

Configuration file format

The Network Security Configuration feature uses an XML file format. The overall structure of the file is shown in the following code sample:

The following sections describe the syntax and other details of the file format.

Any values that are not set use the platform default values.

The default configuration for apps targeting Android 9 (API level 28) and higher is as follows:

The default configuration for apps targeting Android 7.0 (API level 24) to Android 8.1 (API level 27) is as follows:

The default configuration for apps targeting Android 6.0 (API level 23) and lower is as follows:

Any number of nested Description Configuration used for connections to specific destinations, as defined by the domain elements.

Note that if multiple domain-config elements cover a destination, the configuration with the most specific (longest) matching domain rule is used.

Specifies if the CAs from this source bypass certificate pinning. If «true» , then pinning is not performed on certificate chains which are signed by one of the CAs from this source. This can be useful for debugging CAs or for testing man-in-the-middle attacks on your app’s secure traffic.

Default is «false» unless specified in a debug-overrides element, in which case the default is «true» .

for the format of pins. Attributes: expiration The date, in yyyy-MM-dd format, on which the pins expire, thus disabling pinning. If the attribute is not set, then the pins do not expire.

Expiration helps prevent connectivity issues in apps which do not get updates to their pin set, such as when the user disables app updates.

Additional resources

For more information about Network Security Configuration, consult the following resources.

Codelabs

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.

Ссылка на основную публикацию
Adblock
detector